[PATCH 2/5] parallels: don't forget to unlock domain if unregister fails

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

 



Signed-off-by: Maxim Nestratov <mnestratov@xxxxxxxxxxxxx>
---
 src/parallels/parallels_driver.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c
index c9338b5..90b8b0a 100644
--- a/src/parallels/parallels_driver.c
+++ b/src/parallels/parallels_driver.c
@@ -938,6 +938,7 @@ parallelsDomainUndefineFlags(virDomainPtr domain,
 {
     parallelsConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr dom = NULL;
+    int ret;
 
     virCheckFlags(0, -1);
 
@@ -947,7 +948,11 @@ parallelsDomainUndefineFlags(virDomainPtr domain,
         return -1;
     }
 
-    return prlsdkUnregisterDomain(privconn, dom);
+    ret = prlsdkUnregisterDomain(privconn, dom);
+    if (ret)
+         virObjectUnlock(dom);
+
+    return ret;
 }
 
 static int
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]