mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
nodedev: Add check for NULL obj before call Unlock
Commit id '95ea171b' was a bit too aggressive in removing the if (obj) check since cleanup is reachable after Unlock and obj = NULL.
This commit is contained in:
parent
b183f17d76
commit
045b75c515
@ -650,7 +650,8 @@ nodeDeviceDestroy(virNodeDevicePtr dev)
|
||||
|
||||
cleanup:
|
||||
nodeDeviceUnlock();
|
||||
virNodeDeviceObjUnlock(obj);
|
||||
if (obj)
|
||||
virNodeDeviceObjUnlock(obj);
|
||||
VIR_FREE(wwnn);
|
||||
VIR_FREE(wwpn);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user