lxc: Use virDomainObjEndAPI after FindByName

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

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2018-03-10 08:47:44 -05:00
parent bb0e0bcf6a
commit 849b6a7b6a

View 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;
}