efi/chainloader: fix use after free

Found by: Coverity scan.
CID: 96714
This commit is contained in:
Andrei Borzenkov 2015-06-20 23:38:17 +03:00
parent 0fb886cde9
commit c069460259

View file

@ -351,6 +351,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
loaded_image->device_handle = dev_handle;
grub_file_close (file);
file = NULL;
if (argc > 1)
{