• J
    conf: Use virDomainObjListFindBy*Locked for virDomainObjListAdd · 7ae28920
    John Ferlan 提交于
    Use the FindBy{UUID|Name}Locked helpers which will return a locked
    and ref counted object rather than the direct virHashLookup and
    virObjectLock of the returned object. We'll need to temporarily
    virObjectUnref when we assign a new domain @def, but that will
    change shortly when virDomainObjListAddObjLocked returns the
    correct reference counted object.
    
    Use the virDomainObjEndAPI in the error path to Unref/Unlock for
    the corresponding Unref/Unlock of either the FindBy* return or
    the virDomainObjNew since both return a reffed/locked object.
    Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
    Reviewed-by: NErik Skultety <eskultet@redhat.com>
    7ae28920
virdomainobjlist.c 29.2 KB