[or-cvs] no more memory leaks

Roger Dingledine arma at seul.org
Sat Oct 18 04:18:28 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/dev/src/or

Modified Files:
	routers.c 
Log Message:
no more memory leaks
when you run it under normal operation
for as many as three minutes


Index: routers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routers.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- routers.c	18 Oct 2003 03:23:26 -0000	1.82
+++ routers.c	18 Oct 2003 04:18:26 -0000	1.83
@@ -746,11 +746,12 @@
       log_fn(LOG_WARN, "Couldn't resolve router %s; removing",
              dir->routers[i]->address);
       remove = 1;
-      routerinfo_free(dir->routers[i]);
-    } else if (options.Nickname && !strcmp(dir->routers[i]->nickname, options.Nickname)) {
+    } else if (options.Nickname &&
+               !strcmp(dir->routers[i]->nickname, options.Nickname)) {
       remove = 1;
     }
     if (remove) {
+      routerinfo_free(dir->routers[i]);
       dir->routers[i] = dir->routers[--max];
       --dir->n_routers;
       --i;



More information about the tor-commits mailing list