[PATCH] qemuBackupDiskDataCleanupOne: Don't skip rest of cleanup if we can't enter monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux