]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: MigratePerform: properly cleanup after libxlDomObjFromDomain
authorJim Fehlig <jfehlig@suse.com>
Tue, 13 Mar 2018 17:05:36 +0000 (11:05 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 16 Mar 2018 17:14:58 +0000 (11:14 -0600)
libxlDomObjFromDomain 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@suse.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/libxl/libxl_driver.c

index a89816e3347bda28c4f32a719efc7e1d99144b2f..bb812b782bc48d4ddec716d24c290d384b21ca1a 100644 (file)
@@ -6097,8 +6097,7 @@ libxlDomainMigratePerform3Params(virDomainPtr dom,
     ret = 0;
 
  cleanup:
-    if (vm)
-        virObjectUnlock(vm);
+    virDomainObjEndAPI(&vm);
     return ret;
 }