nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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