mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 23:59:22 +00:00
kern/efi: Fix memory leak on failure
Free the memory allocated to name before returning on failure. Fixes: CID 296222 Signed-off-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
d06161b035
commit
ed286ceba6
1 file changed
+1
@@ -410,6 +410,7 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
|
|||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_OUT_OF_RANGE,
|
grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||||
"malformed EFI Device Path node has length=%d", len);
|
"malformed EFI Device Path node has length=%d", len);
|
||||||
|
grub_free (name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user