]> git.ipfire.org Git - thirdparty/libvirt.git/commit
openvz: Use virDomainObjListFindBy{UUID|ID}Ref
authorJohn Ferlan <jferlan@redhat.com>
Fri, 9 Mar 2018 16:48:04 +0000 (11:48 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 11 Apr 2018 15:54:01 +0000 (11:54 -0400)
commit9b4fe4c151442317130a8f3504d38e067f84989e
tree405b24bccf9c733c33f7997150bd4491b72ea675
parentb7eb4b93c344e901bc6df04d07c88a16020f75c2
openvz: Use virDomainObjListFindBy{UUID|ID}Ref

For openvzDomObjFromDomainLocked and openvzDomainLookupByID
let's return a locked and referenced @vm object so that callers
can then use the common and more consistent virDomainObjEndAPI
in order to handle cleanup rather than needing to know that the
returned object is locked and calling virObjectUnlock.

The LookupByName already returns the ref counted and locked object,
so this will make things more consistent.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
src/openvz/openvz_driver.c