From: Michal Privoznik Date: Wed, 10 Nov 2021 08:56:29 +0000 (+0100) Subject: Use virInterfaceObjEndAPI() more X-Git-Tag: v7.10.0-rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6edab9d5d38e4f2852b654726c729f678619a9f;p=thirdparty%2Flibvirt.git Use virInterfaceObjEndAPI() more Instead of explicit virObjectUnlock(obj) + virObjectUnref(obj) combo the virInterfaceObjEndAPI() can be used. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c index fa7a21c054..c5dfa6c7f5 100644 --- a/src/conf/virinterfaceobj.c +++ b/src/conf/virinterfaceobj.c @@ -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); }