coverity: fix some defects.