V3: Coverity / static analysis based cleanups