cppcheck
handle OOM