From: Michal Privoznik Date: Wed, 10 Nov 2021 09:01:02 +0000 (+0100) Subject: Use virSecretObjEndAPI() more X-Git-Tag: v7.10.0-rc1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=061b691cffd00dae3423bdf4a5efe5c2cb59eb5d;p=thirdparty%2Flibvirt.git Use virSecretObjEndAPI() more Instead of explicit virObjectUnlock(obj) + virObjectUnref(obj) combo the virSecretObjEndAPI() can be used. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index bdd5e4a6f7..212cfe103c 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -301,8 +301,7 @@ virSecretObjListRemove(virSecretObjList *secrets, virObjectRWLockWrite(secrets); virObjectLock(obj); virHashRemoveEntry(secrets->objs, uuidstr); - virObjectUnlock(obj); - virObjectUnref(obj); + virSecretObjEndAPI(&obj); virObjectRWUnlock(secrets); }