summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-01-24 01:14:50 +0000
committerRoger Dingledine <arma@torproject.org>2008-01-24 01:14:50 +0000
commite67f23f8973512a343ee288c0ed3564209b46647 (patch)
treeb857ba3d1746a3d31973f3576522bb59e31e6768
parentc4fa6d2551fda86ca2a66efdc1a985629665e800 (diff)
downloadtor-e67f23f8973512a343ee288c0ed3564209b46647.tar.gz
tor-e67f23f8973512a343ee288c0ed3564209b46647.zip
weasel was worried there was a leak here. i don't think there
is. but i could be wrong. svn:r13248
-rw-r--r--src/or/policies.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 17d0f9c25c..e713b955da 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -84,7 +84,7 @@ policy_expand_private(smartlist_t **policy)
/**
* Given a linked list of config lines containing "allow" and "deny"
* tokens, parse them and append the result to <b>dest</b>. Return -1
- * if any tokens are malformed, else return 0.
+ * if any tokens are malformed (and don't append any), else return 0.
*/
static int
parse_addr_policy(config_line_t *cfg, smartlist_t **dest,
@@ -336,8 +336,9 @@ load_policy_from_option(config_line_t *config, smartlist_t **policy,
addr_policy_list_free(*policy);
*policy = NULL;
r = parse_addr_policy(config, policy, assume_action);
- if (r < 0 || !*policy)
+ if (r < 0 || !*policy) {
return; /* XXXX020 have an error return. */
+ }
SMARTLIST_FOREACH(*policy, addr_policy_t *, n, {
/* ports aren't used. */
n->prt_min = 1;