nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone
28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
27a4da
From: Andrei Borzenkov <arvidjaar@gmail.com>
27a4da
Date: Sat, 20 Jun 2015 23:38:17 +0300
28f7f8
Subject: [PATCH] efi/chainloader: fix use after free
27a4da
27a4da
Found by: Coverity scan.
27a4da
CID: 96714
27a4da
---
27a4da
 grub-core/loader/efi/chainloader.c | 1 +
27a4da
 1 file changed, 1 insertion(+)
27a4da
27a4da
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
28f7f8
index 233237018b5..ec23cf4ed66 100644
27a4da
--- a/grub-core/loader/efi/chainloader.c
27a4da
+++ b/grub-core/loader/efi/chainloader.c
27a4da
@@ -351,6 +351,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
27a4da
   loaded_image->device_handle = dev_handle;
27a4da
 
27a4da
   grub_file_close (file);
27a4da
+  file = NULL;
27a4da
 
27a4da
   if (argc > 1)
27a4da
     {