]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/pve/0061-vma-create-avoid-triggering-assertion-in-error-case.patch
update submodule and patches to 7.1.0
[pve-qemu.git] / debian / patches / pve / 0061-vma-create-avoid-triggering-assertion-in-error-case.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Fabian Ebner <f.ebner@proxmox.com>
3 Date: Wed, 22 Jun 2022 10:45:12 +0200
4 Subject: [PATCH] vma: create: avoid triggering assertion in error case
5
6 error_setg expects its argument to not be initialized yet.
7
8 Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
9 ---
10 vma-writer.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13 diff --git a/vma-writer.c b/vma-writer.c
14 index df4b20793d..ac7da237d0 100644
15 --- a/vma-writer.c
16 +++ b/vma-writer.c
17 @@ -311,6 +311,8 @@ VmaWriter *vma_writer_create(const char *filename, uuid_t uuid, Error **errp)
18 }
19
20 if (vmaw->fd < 0) {
21 + error_free(*errp);
22 + *errp = NULL;
23 error_setg(errp, "can't open file %s - %s\n", filename,
24 g_strerror(errno));
25 goto err;