test: fix runner memory leak reported by valgrind