cleanup stuff found by clang static analyzer