Fixes to Coverity errors 72653, 72685, 72707, 73391, 73393, 73394, 73410 and 73414.