diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files/0017-disk-ldm-If-failed-then-free-vg-variable-too.patch')
-rw-r--r-- | meta/recipes-bsp/grub/files/0017-disk-ldm-If-failed-then-free-vg-variable-too.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0017-disk-ldm-If-failed-then-free-vg-variable-too.patch b/meta/recipes-bsp/grub/files/0017-disk-ldm-If-failed-then-free-vg-variable-too.patch new file mode 100644 index 0000000000..ecdb230f76 --- /dev/null +++ b/meta/recipes-bsp/grub/files/0017-disk-ldm-If-failed-then-free-vg-variable-too.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 253485e8df3c9dedac848567e638157530184295 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paulo Flabiano Smorigo <pfsmorigo@canonical.com> | ||
3 | Date: Mon, 7 Dec 2020 10:07:47 -0300 | ||
4 | Subject: [PATCH] disk/ldm: If failed then free vg variable too | ||
5 | |||
6 | Fixes: CID 73809 | ||
7 | |||
8 | Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@canonical.com> | ||
9 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
10 | |||
11 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e0b83df5da538d2a38f770e60817b3a4b9d5b4d7] | ||
12 | Signed-off-by: Marta Rybczynska <marta.rybczynska@huawei.com> | ||
13 | --- | ||
14 | grub-core/disk/ldm.c | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/grub-core/disk/ldm.c b/grub-core/disk/ldm.c | ||
18 | index 428415f..54713f4 100644 | ||
19 | --- a/grub-core/disk/ldm.c | ||
20 | +++ b/grub-core/disk/ldm.c | ||
21 | @@ -199,6 +199,7 @@ make_vg (grub_disk_t disk, | ||
22 | { | ||
23 | grub_free (vg->uuid); | ||
24 | grub_free (vg->name); | ||
25 | + grub_free (vg); | ||
26 | return NULL; | ||
27 | } | ||
28 | grub_memcpy (vg->uuid, label->group_guid, LDM_GUID_STRLEN); | ||