plug a few coverity-spotted leaks