[PATCH 4/4] libxl: MigratePerform: properly cleanup after libxlDomObjFromDomain

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

 



ibxlDomObjFromDomain to returns locked and ref counted virDomainObj but
libxlDomainMigratePerform3Params only unlocks the object on exit. Convert
it to use the virDomainObjEndAPI function for cleanup.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/libxl/libxl_driver.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 67a638da0..6f1c69b1d 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -6086,8 +6086,7 @@ libxlDomainMigratePerform3Params(virDomainPtr dom,
     ret = 0;
 
  cleanup:
-    if (vm)
-        virObjectUnlock(vm);
+    virDomainObjEndAPI(&vm);
     return ret;
 }
 
-- 
2.16.2

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

  Powered by Linux