fix memory leak in the pgf-parse tool