Use virSecretObjEndAPI() more

Instead of explicit virObjectUnlock(obj) + virObjectUnref(obj)
combo the virSecretObjEndAPI() 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 10:01:02 +01:00
parent cb3d3b4f38
commit 061b691cff

View File

@ -301,8 +301,7 @@ virSecretObjListRemove(virSecretObjList *secrets,
virObjectRWLockWrite(secrets);
virObjectLock(obj);
virHashRemoveEntry(secrets->objs, uuidstr);
virObjectUnlock(obj);
virObjectUnref(obj);
virSecretObjEndAPI(&obj);
virObjectRWUnlock(secrets);
}