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

John Ferlan posted 1 patch 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180402133844.31003-1-jferlan@redhat.com
Test syntax-check passed
src/lxc/lxc_process.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[libvirt] [PATCH] lxc: Use virDomainObjEndAPI after FindByName
Posted by John Ferlan 6 years ago
For consistency, rather than open coding the Unref and Unlock,
just use the virDomainObjEndAPI API.

Signed-off-by: John Ferlan <jferlan@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list