summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-09-22 09:55:05 -0400
committerNick Mathewson <nickm@torproject.org>2015-09-22 09:55:05 -0400
commit6b6a714732e1bec58ee92b535902a5bbc5c7e946 (patch)
tree377a5a464b69e0418df319ec3d17f92f02d49e43
parentdf0b4f0342fc95f213cb5bb19a1f5260d546c1b6 (diff)
downloadtor-6b6a714732e1bec58ee92b535902a5bbc5c7e946.tar.gz
tor-6b6a714732e1bec58ee92b535902a5bbc5c7e946.zip
Fix a memory leak in router_parse_addr_policy_item_from_string. CID 1324770
-rw-r--r--src/or/routerparse.c4
1 files changed, 3 insertions, 1 deletions
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;