8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
30 lines
729 B
Diff
30 lines
729 B
Diff
From 64440daa21e150337ee285674eca3dd84de20958 Mon Sep 17 00:00:00 2001
|
|
From: Andrei Borzenkov <arvidjaar@gmail.com>
|
|
Date: Mon, 26 Jan 2015 21:07:19 +0300
|
|
Subject: [PATCH 244/506] util/setup: fix memory leak.
|
|
|
|
Found by: Coverity scan.
|
|
---
|
|
util/setup.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/util/setup.c b/util/setup.c
|
|
index 9fb91a8..ed4bd11 100644
|
|
--- a/util/setup.c
|
|
+++ b/util/setup.c
|
|
@@ -322,7 +322,10 @@ SETUP (const char *dir,
|
|
continue;
|
|
try_dev = grub_device_open (drive);
|
|
if (! try_dev)
|
|
- continue;
|
|
+ {
|
|
+ free (drive);
|
|
+ continue;
|
|
+ }
|
|
if (!found && try_dev->disk->id == dest_dev->disk->id
|
|
&& try_dev->disk->dev->id == dest_dev->disk->dev->id)
|
|
{
|
|
--
|
|
2.4.3
|
|
|