fix for clang static analyzer issue CWE-119