V2: Coverity / static analysis based cleanups