diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4aa08d036f..0514540485 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -741,9 +741,7 @@ static void virDomainObjListDataFree(void *payload, const void *name ATTRIBUTE_UNUSED) { virDomainObjPtr obj = payload; - virDomainObjLock(obj); - if (virObjectUnref(obj)) - virDomainObjUnlock(obj); + virObjectUnref(obj); } int virDomainObjListInit(virDomainObjListPtr doms) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 684892452a..e963ed384a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3499,8 +3499,8 @@ endjob: ignore_value(qemuDomainObjEndAsyncJob(driver, wdEvent->vm)); unlock: - if (virObjectUnref(wdEvent->vm)) - virDomainObjUnlock(wdEvent->vm); + virDomainObjUnlock(wdEvent->vm); + virObjectUnref(wdEvent->vm); qemuDriverUnlock(driver); VIR_FREE(wdEvent); } diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index 23493bd665..ae4ed46fb0 100644 --- a/src/rpc/virnetserver.c +++ b/src/rpc/virnetserver.c @@ -191,10 +191,7 @@ static void virNetServerHandleJob(void *jobOpaque, void *opaque) if (virNetServerProcessMsg(srv, job->client, job->prog, job->msg) < 0) goto error; - virNetServerLock(srv); virObjectUnref(job->prog); - virNetServerUnlock(srv); - virObjectUnref(job->client); VIR_FREE(job); return;