uml: Use virDomainObjListFindBy{UUID|ID}Ref
For umlDomObjFromDomainLocked and umlDomainLookupByID 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. This means for some consumers we need to relock the @dom after a virDomainObjListRemove, but before calling virDomainObjEndAPI. The LookupByName already returns the ref counted and locked object, so this will make things more consistent. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
Showing
想要评论请 注册 或 登录