dcavalca / rpms / grub2

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