[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r12841: fix another mem leak, and point out another for karsten (tor/trunk/src/or)



Author: arma
Date: 2007-12-16 15:46:23 -0500 (Sun, 16 Dec 2007)
New Revision: 12841

Modified:
   tor/trunk/src/or/routerparse.c
Log:
fix another mem leak, and point out another for karsten


Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c	2007-12-16 17:50:38 UTC (rev 12840)
+++ tor/trunk/src/or/routerparse.c	2007-12-16 20:46:23 UTC (rev 12841)
@@ -3402,7 +3402,7 @@
     intro_points_encrypted_size = unenclen;
   }
   /* Consider one intro point after the other. */
-  current_ipo = (const char **)&intro_points_encrypted;
+  current_ipo = &intro_points_encrypted;
   intropoints = smartlist_create();
   tokens = smartlist_create();
   if (parsed->intro_keys) {
@@ -3479,6 +3479,9 @@
     tok->key = NULL; /* Prevent free */
     /* Add extend info to list of introduction points. */
     smartlist_add(intropoints, info);
+    /* XXX if intropoints has items on it, but we goto err the next
+     * time through the loop, we don't free the items in the 'err'
+     * section below. -RD */
   }
   /* Write extend infos to descriptor. */
   /* XXXX020 what if intro_points (&tc) are already set? */
@@ -3506,6 +3509,8 @@
   SMARTLIST_FOREACH(tokens, directory_token_t *, t, token_free(t));
   smartlist_free(tokens);
 
+  smartlist_free(intropoints);
+
   return result;
 }