Recent fix to use the proper 'async' monitor function would cause
libvirt to leak some of the objects it's supposed to clean up in other
places besides qemu.
Don't skip the whole function on failure to enter the job but just the
monitor section.
Fixes: 9b22c25548aa658acdeac2269ddae32584df32d8
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_backup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 5eb2cbe306..f64639d501 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -125,10 +125,10 @@ qemuBackupDiskDataCleanupOne(virDomainObj *vm,
if (!dd->started) {
if (dd->added) {
- if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_BACKUP) < 0)
- return;
- qemuBlockStorageSourceAttachRollback(priv->mon,
dd->crdata->srcdata[0]);
- qemuDomainObjExitMonitor(vm);
+ if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_BACKUP) == 0) {
+ qemuBlockStorageSourceAttachRollback(priv->mon,
dd->crdata->srcdata[0]);
+ qemuDomainObjExitMonitor(vm);
+ }
}
if (dd->created) {
--
2.46.0