8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
30 lines
806 B
Diff
30 lines
806 B
Diff
From 3b1b39c08234ba856ec89748f379bac7c710e11a Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
Date: Sat, 24 Jan 2015 21:29:19 +0100
|
|
Subject: [PATCH 197/506] commands/wildcard: Add missing free.
|
|
|
|
Found by: Coverity scan.
|
|
---
|
|
grub-core/commands/wildcard.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c
|
|
index 2807f80..d207acf 100644
|
|
--- a/grub-core/commands/wildcard.c
|
|
+++ b/grub-core/commands/wildcard.c
|
|
@@ -245,7 +245,10 @@ match_devices_iter (const char *name, void *data)
|
|
|
|
t = grub_realloc (ctx->devs, sizeof (char*) * (ctx->ndev + 2));
|
|
if (! t)
|
|
- return 1;
|
|
+ {
|
|
+ grub_free (buffer);
|
|
+ return 1;
|
|
+ }
|
|
|
|
ctx->devs = t;
|
|
ctx->devs[ctx->ndev++] = buffer;
|
|
--
|
|
2.4.3
|
|
|