]> git.proxmox.com Git - pve-qemu.git/blobdiff - 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
diff --git a/debian/patches/pve/0061-vma-create-avoid-triggering-assertion-in-error-case.patch b/debian/patches/pve/0061-vma-create-avoid-triggering-assertion-in-error-case.patch
new file mode 100644 (file)
index 0000000..c7961ae
--- /dev/null
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Fabian Ebner <f.ebner@proxmox.com>
+Date: Wed, 22 Jun 2022 10:45:12 +0200
+Subject: [PATCH] vma: create: avoid triggering assertion in error case
+
+error_setg expects its argument to not be initialized yet.
+
+Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
+---
+ vma-writer.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/vma-writer.c b/vma-writer.c
+index df4b20793d..ac7da237d0 100644
+--- a/vma-writer.c
++++ b/vma-writer.c
+@@ -311,6 +311,8 @@ VmaWriter *vma_writer_create(const char *filename, uuid_t uuid, Error **errp)
+         }
+         if (vmaw->fd < 0) {
++            error_free(*errp);
++            *errp = NULL;
+             error_setg(errp, "can't open file %s - %s\n", filename,
+                        g_strerror(errno));
+             goto err;