1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-11 09:17:52 +03:00

Use virNodeDeviceObjEndAPI() more

Instead of explicit virObjectUnlock(obj) + virObjectUnref(obj)
combo the virNodeDeviceObjEndAPI() 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:59:55 +01:00
parent 375fb7d576
commit cb3d3b4f38

View File

@ -524,8 +524,7 @@ virNodeDeviceObjListRemove(virNodeDeviceObjList *devs,
virObjectRWLockWrite(devs);
virObjectLock(obj);
virNodeDeviceObjListRemoveLocked(devs, obj);
virObjectUnlock(obj);
virObjectUnref(obj);
virNodeDeviceObjEndAPI(&obj);
virObjectRWUnlock(devs);
}