diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-01-30 21:16:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-01-30 21:16:51 +0000 |
commit | a81435c64e3488f0c5d210e62d3b1d48417964b4 (patch) | |
tree | 05127200a68076e068ca493b49c2a98924554d80 | |
parent | e4ad1f1629571045dcdcaac8477e1444a1fad5b0 (diff) | |
download | tor-a81435c64e3488f0c5d210e62d3b1d48417964b4.tar tor-a81435c64e3488f0c5d210e62d3b1d48417964b4.tar.gz |
Another related leak
svn:r1028
-rw-r--r-- | src/or/routerlist.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 871b34b11..1c658278b 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -869,18 +869,21 @@ router_add_exit_policy_from_string(routerinfo_t *router, const char *s) tmp[len+1]='\0'; if (router_get_next_token(&cp, &tok)) { log_fn(LOG_WARN, "Error reading exit policy: %s", tok.val.error); - free(tmp); - return -1; + goto err; } if (tok.tp != K_ACCEPT && tok.tp != K_REJECT) { log_fn(LOG_WARN, "Expected 'accept' or 'reject'."); - free(tmp); - return -1; + goto err; } /* Now that we've gotten an exit policy, add it to the router. */ r = router_add_exit_policy(router, &tok); + goto done; + err: + r = -1; + done: free(tmp); + router_release_token(&tok); return r; } |