mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 23:02:40 +00:00
loader/efi/linux: Reset freed pointer
Avoid dangling pointer. Code should not be reached but better safe than sorry. Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
92bed41bf8
commit
9c34d56c2d
1 file changed
+1
@@ -241,6 +241,7 @@ grub_arch_efi_linux_boot_image (grub_addr_t addr, grub_size_t size, char *args)
|
|||||||
grub_error (GRUB_ERR_BAD_OS, "start_image() returned 0x%" PRIxGRUB_EFI_UINTN_T, status);
|
grub_error (GRUB_ERR_BAD_OS, "start_image() returned 0x%" PRIxGRUB_EFI_UINTN_T, status);
|
||||||
grub_efi_free_pages ((grub_addr_t) loaded_image->load_options,
|
grub_efi_free_pages ((grub_addr_t) loaded_image->load_options,
|
||||||
GRUB_EFI_BYTES_TO_PAGES (len));
|
GRUB_EFI_BYTES_TO_PAGES (len));
|
||||||
|
loaded_image->load_options = NULL;
|
||||||
unload:
|
unload:
|
||||||
b->unload_image (image_handle);
|
b->unload_image (image_handle);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user