mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Use virInterfaceObjEndAPI() more
Instead of explicit virObjectUnlock(obj) + virObjectUnref(obj) combo the virInterfaceObjEndAPI() can be used. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
2d5b403cff
commit
c6edab9d5d
@ -462,8 +462,7 @@ virInterfaceObjListRemove(virInterfaceObjList *interfaces,
|
|||||||
virObjectRWLockWrite(interfaces);
|
virObjectRWLockWrite(interfaces);
|
||||||
virObjectLock(obj);
|
virObjectLock(obj);
|
||||||
virHashRemoveEntry(interfaces->objsName, obj->def->name);
|
virHashRemoveEntry(interfaces->objsName, obj->def->name);
|
||||||
virObjectUnlock(obj);
|
virInterfaceObjEndAPI(&obj);
|
||||||
virObjectUnref(obj);
|
|
||||||
virObjectRWUnlock(interfaces);
|
virObjectRWUnlock(interfaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user