[or-cvs] r13248: weasel was worried there was a leak here. i don't think ther (tor/trunk/src/or)

arma at seul.org arma at seul.org
Thu Jan 24 01:14:50 UTC 2008


Author: arma
Date: 2008-01-23 20:14:50 -0500 (Wed, 23 Jan 2008)
New Revision: 13248

Modified:
   tor/trunk/src/or/policies.c
Log:
weasel was worried there was a leak here. i don't think there
is. but i could be wrong.


Modified: tor/trunk/src/or/policies.c
===================================================================
--- tor/trunk/src/or/policies.c	2008-01-24 01:06:42 UTC (rev 13247)
+++ tor/trunk/src/or/policies.c	2008-01-24 01:14:50 UTC (rev 13248)
@@ -84,7 +84,7 @@
 /**
  * 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 @@
   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;



More information about the tor-commits mailing list