For consistency, rather than open coding the Unref and Unlock, just use the virDomainObjEndAPI API. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- Pushed as trivial src/lxc/lxc_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index bc321e360d..85c7bcc321 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -420,8 +420,7 @@ static int virLXCProcessSetupNamespaceName(virConnectPtr conn, int ns_type, cons cleanup: VIR_FREE(path); - virObjectUnlock(vm); - virObjectUnref(vm); + virDomainObjEndAPI(&vm); return fd; } -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list