[libvirt] [PATCH] lxc: Use virDomainObjEndAPI after FindByName

John Ferlan jferlan at redhat.com
Mon Apr 2 13:38:44 UTC 2018


For consistency, rather than open coding the Unref and Unlock,
just use the virDomainObjEndAPI API.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---

 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




More information about the libvir-list mailing list