]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: Use virDomainObjEndAPI after FindByName
authorJohn Ferlan <jferlan@redhat.com>
Sat, 10 Mar 2018 13:47:44 +0000 (08:47 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 2 Apr 2018 13:38:19 +0000 (09:38 -0400)
For consistency, rather than open coding the Unref and Unlock,
just use the virDomainObjEndAPI API.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/lxc/lxc_process.c

index bc321e360d60141e2cf08aa4b808e27c951ac2ec..85c7bcc321dbb8c2750cb4ae26d1381401ed0b6f 100644 (file)
@@ -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;
 }