Blame SOURCES/0204-blscfg-don-t-leak-bls_entry.filename.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Will Thompson <wjt@endlessm.com>
8631a2
Date: Thu, 12 Jul 2018 10:59:10 +0100
8631a2
Subject: [PATCH] blscfg: don't leak bls_entry.filename
8631a2
8631a2
Zeroing the bls_entry struct before calling grub_free() on one of its
8631a2
fields is not going to work too well.
8631a2
8631a2
Signed-off-by: Will Thompson <wjt@endlessm.com>
8631a2
---
8631a2
 grub-core/commands/blscfg.c | 2 +-
8631a2
 1 file changed, 1 insertion(+), 1 deletion(-)
8631a2
8631a2
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
09e3cc
index a45f40fe6..11a356de8 100644
8631a2
--- a/grub-core/commands/blscfg.c
8631a2
+++ b/grub-core/commands/blscfg.c
8631a2
@@ -166,8 +166,8 @@ static void bls_free_entry(struct bls_entry *entry)
8631a2
     }
8631a2
 
8631a2
   grub_free (entry->keyvals);
8631a2
-  grub_memset (entry, 0, sizeof (*entry));
8631a2
   grub_free (entry->filename);
8631a2
+  grub_memset (entry, 0, sizeof (*entry));
8631a2
   grub_free (entry);
8631a2
 }
8631a2