nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0401-disk-ldm-If-failed-then-free-vg-variable-too.patch

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