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:
Michal Privoznik 2021-11-10 09:56:29 +01:00
parent 2d5b403cff
commit c6edab9d5d

View File

@ -462,8 +462,7 @@ virInterfaceObjListRemove(virInterfaceObjList *interfaces,
virObjectRWLockWrite(interfaces);
virObjectLock(obj);
virHashRemoveEntry(interfaces->objsName, obj->def->name);
virObjectUnlock(obj);
virObjectUnref(obj);
virInterfaceObjEndAPI(&obj);
virObjectRWUnlock(interfaces);
}