8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
40 lines
1.0 KiB
Diff
40 lines
1.0 KiB
Diff
From 4947f11b09184806cbfda7ebb2ae25df25be6693 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
Date: Sat, 24 Jan 2015 21:22:02 +0100
|
|
Subject: [PATCH 193/506] commands/parttool: Add missing device close.
|
|
|
|
Found by: Coverity scan.
|
|
---
|
|
grub-core/commands/parttool.c | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/grub-core/commands/parttool.c b/grub-core/commands/parttool.c
|
|
index a47ff07..d907694 100644
|
|
--- a/grub-core/commands/parttool.c
|
|
+++ b/grub-core/commands/parttool.c
|
|
@@ -243,11 +243,19 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
|
|
}
|
|
|
|
if (argc == 1)
|
|
- return show_help (dev);
|
|
+ {
|
|
+ err = show_help (dev);
|
|
+ grub_device_close (dev);
|
|
+ return err;
|
|
+ }
|
|
|
|
for (i = 1; i < argc; i++)
|
|
if (grub_strcmp (args[i], "help") == 0)
|
|
- return show_help (dev);
|
|
+ {
|
|
+ err = show_help (dev);
|
|
+ grub_device_close (dev);
|
|
+ return err;
|
|
+ }
|
|
|
|
parsed = (int *) grub_zalloc (argc * sizeof (int));
|
|
|
|
--
|
|
2.4.3
|
|
|