fix memory leak in dump_exit_policy_to_string tests