dcavalca / rpms / grub2

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