More fixes for coverity static analyzer.