dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
Blob Blame History Raw
From 2dbafd9ecd2d805385d93e0eca587d473a6bc220 Mon Sep 17 00:00:00 2001
From: Andrei Borzenkov <arvidjaar@gmail.com>
Date: Sat, 20 Jun 2015 23:38:17 +0300
Subject: [PATCH 216/260] efi/chainloader: fix use after free

Found by: Coverity scan.
CID: 96714
---
 grub-core/loader/efi/chainloader.c | 1 +
 1 file changed, 1 insertion(+)

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)
     {
-- 
2.13.0