Fix Coverity defects.