e55cfcd Add more Coverity fixes from upstream

Authored and Committed by omos 5 years ago
    Add more Coverity fixes from upstream
    
    This commit updates the last PR patch (one of the commits was not
    accepted upstream) and adds new fixes that have been added in the
    meantime (including an alternative version of the patch that had been
    dropped).
    
        
file modified
+7 -2