render / rpms / libvirt

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