266ea5b Fix issues found by static analysis

Authored and Committed by mcsontos a year ago
    Fix issues found by static analysis