---
src/bhyve/bhyve_driver.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 580b124..af10ad3 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -522,8 +522,7 @@ bhyveDomainDefineXML(virConnectPtr conn, const char *xml)
virObjectUnref(caps);
virDomainDefFree(def);
virDomainDefFree(oldDef);
- if (vm)
- virObjectUnlock(vm);
+ virObjectUnlock(vm);
return dom;
}
@@ -883,8 +882,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
cleanup:
virObjectUnref(caps);
virDomainDefFree(def);
- if (vm)
- virObjectUnlock(vm);
+ virObjectUnlock(vm);
return dom;
}
@@ -916,8 +914,7 @@ bhyveDomainDestroy(virDomainPtr dom)
}
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virObjectUnlock(vm);
return ret;
}
--
1.9.0