From: Nick Mathewson Date: Tue, 22 Sep 2015 13:55:05 +0000 (-0400) Subject: Fix a memory leak in router_parse_addr_policy_item_from_string. CID 1324770 X-Git-Tag: tor-0.2.7.3-rc~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b6a714732e1bec58ee92b535902a5bbc5c7e946;p=thirdparty%2Ftor.git Fix a memory leak in router_parse_addr_policy_item_from_string. CID 1324770 --- 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;