summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-09-13 21:53:38 +0000
committerRoger Dingledine <arma@torproject.org>2003-09-13 21:53:38 +0000
commit05612786e47678427257136217d8aff85f687b5a (patch)
tree088a646eee2a5ea4ee555b2810045be197b2a641
parent31bf3ec420a91817fcda84ee2bc897641e712dee (diff)
downloadtor-05612786e47678427257136217d8aff85f687b5a.tar.gz
tor-05612786e47678427257136217d8aff85f687b5a.zip
fix two more bugs
svn:r452
-rw-r--r--src/or/main.c3
-rw-r--r--src/or/or.h2
-rw-r--r--src/or/routers.c4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 3ad95e3b93..6b12777205 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -553,8 +553,9 @@ static void catch(int the_signal) {
break;
case SIGCHLD:
please_reap_children = 1;
+ break;
default:
- log(LOG_ERR,"Caught signal that we can't handle??");
+ log(LOG_ERR,"Caught signal %d that we can't handle??", the_signal);
}
#endif /* signal stuff */
}
diff --git a/src/or/or.h b/src/or/or.h
index 87651872ac..e508f3c9e1 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -7,7 +7,7 @@
#include "orconfig.h"
-//#define USE_TLS
+#define USE_TLS
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/or/routers.c b/src/or/routers.c
index a1b8289b67..b1ebbe7cd4 100644
--- a/src/or/routers.c
+++ b/src/or/routers.c
@@ -188,7 +188,8 @@ void directory_free(directory_t *directory)
for (i = 0; i < directory->n_routers; ++i)
routerinfo_free(directory->routers[i]);
free(directory->routers);
- /* XXX are we leaking directory->software_versions here? */
+ if(directory->software_versions)
+ free(directory->software_versions);
free(directory);
}
@@ -697,6 +698,7 @@ static int router_get_list_from_string_tok(char **s, directory_t **dest,
*dest = (directory_t *)tor_malloc(sizeof(directory_t));
(*dest)->routers = rarray;
(*dest)->n_routers = rarray_len;
+ (*dest)->software_versions = NULL;
return 0;
}