mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
bb0e0bcf6a
commit
849b6a7b6a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue