Blame SOURCES/0217-chainloader-fix-resoource-leak.patch
|
|
a85e8e |
From 1ab98376bfb9c19fcf44f826652dbfd4ac7727e6 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Andrei Borzenkov <arvidjaar@gmail.com>
|
|
|
a85e8e |
Date: Fri, 26 Jun 2015 09:25:30 +0300
|
|
|
a85e8e |
Subject: [PATCH 217/260] chainloader: fix resoource leak
|
|
|
a85e8e |
|
|
|
a85e8e |
Found by: Coverity scan.
|
|
|
a85e8e |
CID: 96651
|
|
|
a85e8e |
---
|
|
|
a85e8e |
grub-core/loader/efi/chainloader.c | 6 +++---
|
|
|
a85e8e |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
|
|
|
a85e8e |
index ec23cf4ed..522a716e3 100644
|
|
|
a85e8e |
--- a/grub-core/loader/efi/chainloader.c
|
|
|
a85e8e |
+++ b/grub-core/loader/efi/chainloader.c
|
|
|
a85e8e |
@@ -350,9 +350,6 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
|
|
a85e8e |
}
|
|
|
a85e8e |
loaded_image->device_handle = dev_handle;
|
|
|
a85e8e |
|
|
|
a85e8e |
- grub_file_close (file);
|
|
|
a85e8e |
- file = NULL;
|
|
|
a85e8e |
-
|
|
|
a85e8e |
if (argc > 1)
|
|
|
a85e8e |
{
|
|
|
a85e8e |
int i, len;
|
|
|
a85e8e |
@@ -382,6 +379,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
|
|
a85e8e |
loaded_image->load_options_size = len;
|
|
|
a85e8e |
}
|
|
|
a85e8e |
|
|
|
a85e8e |
+ grub_file_close (file);
|
|
|
a85e8e |
+ grub_device_close (dev);
|
|
|
a85e8e |
+
|
|
|
a85e8e |
grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
|
|
|
a85e8e |
return 0;
|
|
|
a85e8e |
|
|
|
a85e8e |
--
|
|
|
a85e8e |
2.13.0
|
|
|
a85e8e |
|