]> git.proxmox.com Git - pve-qemu.git/blame - 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
CommitLineData
39e84ba8
TL
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Fabian Ebner <f.ebner@proxmox.com>
3Date: Wed, 22 Jun 2022 10:45:12 +0200
4Subject: [PATCH] vma: create: avoid triggering assertion in error case
5
6error_setg expects its argument to not be initialized yet.
7
8Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
9---
10 vma-writer.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13diff --git a/vma-writer.c b/vma-writer.c
dc9827a6 14index df4b20793d..ac7da237d0 100644
39e84ba8
TL
15--- a/vma-writer.c
16+++ b/vma-writer.c
dc9827a6 17@@ -311,6 +311,8 @@ VmaWriter *vma_writer_create(const char *filename, uuid_t uuid, Error **errp)
39e84ba8
TL
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;