[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix two more memory problems
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/dev/src/or
Modified Files:
dirserv.c routers.c
Log Message:
fix two more memory problems
one remains :)
Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- dirserv.c 17 Oct 2003 10:24:58 -0000 1.11
+++ dirserv.c 18 Oct 2003 03:23:26 -0000 1.12
@@ -251,7 +251,7 @@
}
(*desc_ent_ptr) = tor_malloc(sizeof(descriptor_entry_t));
- (*desc_ent_ptr)->nickname = ri->nickname;
+ (*desc_ent_ptr)->nickname = strdup(ri->nickname);
(*desc_ent_ptr)->published = ri->published_on;
(*desc_ent_ptr)->desc_len = desc_len;
(*desc_ent_ptr)->descriptor = tor_malloc(desc_len+1);
@@ -444,3 +444,4 @@
*directory = the_directory;
return the_directory_len;
}
+
Index: routers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routers.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- routers.c 18 Oct 2003 02:18:22 -0000 1.81
+++ routers.c 18 Oct 2003 03:23:26 -0000 1.82
@@ -771,7 +771,6 @@
directory_token_t _tok;
directory_token_t *tok = &_tok;
struct tm published;
-
int t;
#define NEXT_TOKEN() \
@@ -916,6 +915,7 @@
goto err;
}
+ router_release_token(tok); /* free the signature */
return router;
err: