提交 045b75c5 编写于 作者: J John Ferlan

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.
上级 b183f17d
...@@ -650,7 +650,8 @@ nodeDeviceDestroy(virNodeDevicePtr dev) ...@@ -650,7 +650,8 @@ nodeDeviceDestroy(virNodeDevicePtr dev)
cleanup: cleanup:
nodeDeviceUnlock(); nodeDeviceUnlock();
virNodeDeviceObjUnlock(obj); if (obj)
virNodeDeviceObjUnlock(obj);
VIR_FREE(wwnn); VIR_FREE(wwnn);
VIR_FREE(wwpn); VIR_FREE(wwpn);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册