From afbb8a4c8ce776a7532fe49bbc8513acb21f4c92 Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Wed, 18 Nov 2015 15:47:25 -0700 Subject: [PATCH] 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 --- src/libxl/libxl_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 4609c0051f..d77a0e42b1 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -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)