bc092b9
From a0fe0c26aa8a1c0ad66d9527611bd726b849c623 Mon Sep 17 00:00:00 2001
bc092b9
From: AppChecker <appchecker>
bc092b9
Date: Sun, 9 Jul 2017 21:57:35 +0200
78e1a10
Subject: [PATCH 047/216] crypto: Fix use after free.
bc092b9
bc092b9
Reported by: AppChecker
bc092b9
Transformed to patch by: Satish Govindarajan
bc092b9
---
bc092b9
 grub-core/normal/crypto.c | 2 +-
bc092b9
 1 file changed, 1 insertion(+), 1 deletion(-)
bc092b9
bc092b9
diff --git a/grub-core/normal/crypto.c b/grub-core/normal/crypto.c
ec4acbb
index 2bfd67c8ef3..e6d345f3345 100644
bc092b9
--- a/grub-core/normal/crypto.c
bc092b9
+++ b/grub-core/normal/crypto.c
bc092b9
@@ -147,8 +147,8 @@ read_crypto_list (const char *prefix)
bc092b9
       if (! cur->modname)
bc092b9
 	{
bc092b9
 	  grub_errno = GRUB_ERR_NONE;
bc092b9
-	  grub_free (cur);
bc092b9
 	  grub_free (cur->name);
bc092b9
+	  grub_free (cur);
bc092b9
 	  continue;
bc092b9
 	}
bc092b9
       cur->next = crypto_specs;
bc092b9
-- 
ec4acbb
2.15.0
bc092b9