]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
disk/ldm: If failed then free vg variable too
authorPaulo Flabiano Smorigo <pfsmorigo@canonical.com>
Mon, 7 Dec 2020 13:07:47 +0000 (10:07 -0300)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:16 +0000 (15:54 +0100)
Fixes: CID 73809
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/ldm.c

index 48942549a2e04b4ded1746e8787f6b11450a7bca..c25941ec91b0fd699e8864b677c3f38891f5dd65 100644 (file)
@@ -199,6 +199,7 @@ make_vg (grub_disk_t disk,
     {
       grub_free (vg->uuid);
       grub_free (vg->name);
+      grub_free (vg);
       return NULL;
     }
   grub_memcpy (vg->uuid, label->group_guid, LDM_GUID_STRLEN);