From 6b6a714732e1bec58ee92b535902a5bbc5c7e946 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 22 Sep 2015 09:55:05 -0400 Subject: Fix a memory leak in router_parse_addr_policy_item_from_string. CID 1324770 --- src/or/routerparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/or/routerparse.c') diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 17c46acfda..f898ef8aef 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3744,7 +3744,9 @@ router_parse_addr_policy_item_from_string,(const char *s, int assume_action, "exit policy. Ignoring, but continuing to parse rules. (Use " "accept/reject with IPv4 addresses.)", tok->n_args == 1 ? tok->args[0] : ""); - return NULL; + addr_policy_free(r); + r = NULL; + goto done; } goto done; -- cgit v1.2.3-54-g00ecf