]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Use virInterfaceObjEndAPI() more
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Nov 2021 08:56:29 +0000 (09:56 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Nov 2021 10:27:22 +0000 (11:27 +0100)
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>
src/conf/virinterfaceobj.c

index fa7a21c054a7c33afeaea4c06f42de829d5d6ac5..c5dfa6c7f55126354bf160d4f78a7ebd29d95a4c 100644 (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);
 }