render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
b971b8
From 9bec4051732e43d24808893643826268ab88b8cc Mon Sep 17 00:00:00 2001
b971b8
Message-Id: <9bec4051732e43d24808893643826268ab88b8cc@dist-git>
b971b8
From: Peter Krempa <pkrempa@redhat.com>
b971b8
Date: Tue, 23 Jun 2020 12:24:09 +0200
b971b8
Subject: [PATCH] qemuBackupDiskStarted: Fix improper dereference of array
b971b8
MIME-Version: 1.0
b971b8
Content-Type: text/plain; charset=UTF-8
b971b8
Content-Transfer-Encoding: 8bit
b971b8
b971b8
The code would repeatedly mark the first disk's blockjob as started
b971b8
rather than accessing all the blockjobs. Fix the dereferencing operator.
b971b8
b971b8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
b971b8
Reviewed-by: Ján Tomko <jtomko@redhat.com>
b971b8
(cherry picked from commit 214faa0b04ace42aebfa40e1d19aabbf3003f0fe)
b971b8
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
b971b8
Message-Id: <1d33c3080e24baf96a0d9435d1588b4a48a98425.1592906423.git.pkrempa@redhat.com>
b971b8
Reviewed-by: Ján Tomko <jtomko@redhat.com>
b971b8
---
b971b8
 src/qemu/qemu_backup.c | 2 +-
b971b8
 1 file changed, 1 insertion(+), 1 deletion(-)
b971b8
b971b8
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
b971b8
index 013a82e06d..fdc75d3160 100644
b971b8
--- a/src/qemu/qemu_backup.c
b971b8
+++ b/src/qemu/qemu_backup.c
b971b8
@@ -479,7 +479,7 @@ qemuBackupDiskStarted(virDomainObjPtr vm,
b971b8
     for (i = 0; i < ndd; i++) {
b971b8
         dd[i].started = true;
b971b8
         dd[i].backupdisk->state = VIR_DOMAIN_BACKUP_DISK_STATE_RUNNING;
b971b8
-        qemuBlockJobStarted(dd->blockjob, vm);
b971b8
+        qemuBlockJobStarted(dd[i].blockjob, vm);
b971b8
     }
b971b8
 }
b971b8
 
b971b8
-- 
b971b8
2.27.0
b971b8