--- src/parallels/parallels_driver.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ab59599..5e17bc5 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -1117,8 +1117,7 @@ parallelsDomainLookupByID(virConnectPtr conn, int id) ret->id = dom->def->id; cleanup: - if (dom) - virObjectUnlock(dom); + virObjectUnlock(dom); return ret; } @@ -1146,8 +1145,7 @@ parallelsDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid) ret->id = dom->def->id; cleanup: - if (dom) - virObjectUnlock(dom); + virObjectUnlock(dom); return ret; } @@ -1173,8 +1171,7 @@ parallelsDomainLookupByName(virConnectPtr conn, const char *name) ret->id = dom->def->id; cleanup: - if (dom) - virObjectUnlock(dom); + virObjectUnlock(dom); return ret; } @@ -1202,8 +1199,7 @@ parallelsDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) ret = 0; cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); return ret; } @@ -1225,8 +1221,7 @@ parallelsDomainGetOSType(virDomainPtr domain) ignore_value(VIR_STRDUP(ret, privdom->def->os.type)); cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); parallelsDriverUnlock(privconn); return ret; } @@ -1248,8 +1243,7 @@ parallelsDomainIsPersistent(virDomainPtr domain) ret = 1; cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); parallelsDriverUnlock(privconn); return ret; } @@ -1276,8 +1270,7 @@ parallelsDomainGetState(virDomainPtr domain, ret = 0; cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); return ret; } @@ -1306,8 +1299,7 @@ parallelsDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) ret = virDomainDefFormat(def, flags); cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); return ret; } @@ -1331,8 +1323,7 @@ parallelsDomainGetAutostart(virDomainPtr domain, int *autostart) ret = 0; cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); return ret; } @@ -1374,8 +1365,7 @@ parallelsDomainChangeState(virDomainPtr domain, ret = 0; cleanup: - if (privdom) - virObjectUnlock(privdom); + virObjectUnlock(privdom); return ret; } -- 1.9.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list