Fix coverity findings : CID 1042360 and CID 1042359 (unchecked returns)