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

[or-cvs] r8236: stop a big memory leak: we were leaking the whole contents o (tor/trunk/src/or)



Author: arma
Date: 2006-08-26 22:12:12 -0400 (Sat, 26 Aug 2006)
New Revision: 8236

Modified:
   tor/trunk/src/or/routerlist.c
Log:
stop a big memory leak: we were leaking the whole contents
of cached-routers.new every time we read it.


Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2006-08-27 02:07:54 UTC (rev 8235)
+++ tor/trunk/src/or/routerlist.c	2006-08-27 02:12:12 UTC (rev 8236)
@@ -358,6 +358,7 @@
     stat(fname, &st);
     router_load_routers_from_string(contents,
                                     SAVED_IN_JOURNAL, NULL);
+    tor_free(contents);
   }
 
   tor_free(fname);