tests: silence gcc
graph: fix memory leak spotted by cppcheck