3c66d51 vz: Use virDomainObjListFindBy{UUID|ID}Ref

Authored and Committed by John Ferlan 6 years ago
    vz: Use virDomainObjListFindBy{UUID|ID}Ref
    
    For vzDomainLookupByID and vzDomainLookupByUUID 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.
    
    Also adjust the prlsdkHandle{VmState|VmRemoved|Perf}Event APIs
    in the same manner.
    
    Signed-off-by: John Ferlan <jferlan@redhat.com>
    Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
    
        
file modified
+4 -4
file modified
+9 -7