Fix gp_tree_validator leaks