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:
parent
375fb7d576
commit
cb3d3b4f38
@ -524,8 +524,7 @@ virNodeDeviceObjListRemove(virNodeDeviceObjList *devs,
|
||||
virObjectRWLockWrite(devs);
|
||||
virObjectLock(obj);
|
||||
virNodeDeviceObjListRemoveLocked(devs, obj);
|
||||
virObjectUnlock(obj);
|
||||
virObjectUnref(obj);
|
||||
virNodeDeviceObjEndAPI(&obj);
|
||||
virObjectRWUnlock(devs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user