diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c index 233237018..ec23cf4ed 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -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) {