mirror of https://gitee.com/openkylin/libvirt.git
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…
Reference in New Issue