libxl: don't unlock virDomainObj if refcnt is 0

Commit 6472e54a unlocks the virDomainObj even if libxlDomainObjEndJob
returns false, indicating that its refcnt has dropped to 0.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Jim Fehlig 2015-11-18 15:47:25 -07:00
parent 97b56031a9
commit afbb8a4c8c

View File

@ -4816,10 +4816,8 @@ libxlDomainMemoryStats(virDomainPtr dom,
libxl_dominfo_dispose(&d_info);
endjob:
if (!libxlDomainObjEndJob(driver, vm)) {
virObjectUnlock(vm);
if (!libxlDomainObjEndJob(driver, vm))
vm = NULL;
}
cleanup:
if (vm)