Coverity CID 1444957: Error handling issues