Pohelper: fix possble memory leak

This leak was found by cppcheck.