468bd4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
468bd4
From: Paulo Flabiano Smorigo <pfsmorigo@canonical.com>
468bd4
Date: Mon, 7 Dec 2020 10:07:47 -0300
468bd4
Subject: [PATCH] disk/ldm: If failed then free vg variable too
468bd4
468bd4
Fixes: CID 73809
468bd4
468bd4
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@canonical.com>
468bd4
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
468bd4
---
468bd4
 grub-core/disk/ldm.c | 1 +
468bd4
 1 file changed, 1 insertion(+)
468bd4
468bd4
diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c
f6e916
index 428415fac..54713f45a 100644
468bd4
--- a/grub-core/disk/ldm.c
468bd4
+++ b/grub-core/disk/ldm.c
468bd4
@@ -199,6 +199,7 @@ make_vg (grub_disk_t disk,
468bd4
     {
468bd4
       grub_free (vg->uuid);
468bd4
       grub_free (vg->name);
468bd4
+      grub_free (vg);
468bd4
       return NULL;
468bd4
     }
468bd4
   grub_memcpy (vg->uuid, label->group_guid, LDM_GUID_STRLEN);