master

Fix some issues found by Coverity Scan.