libxl: MigratePerform: properly cleanup after libxlDomObjFromDomain

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>
This commit is contained in:
Jim Fehlig 2018-03-13 11:05:36 -06:00
parent 99486799c3
commit f5eacf2a9a

View File

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