aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
parent31bf3ec420a91817fcda84ee2bc897641e712dee (diff)
downloadtor-05612786e47678427257136217d8aff85f687b5a.tar
tor-05612786e47678427257136217d8aff85f687b5a.tar.gz
fix two more bugs
svn:r452
Diffstat (limited to 'src')
-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 3ad95e3b9..6b1277720 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 87651872a..e508f3c9e 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 a1b8289b6..b1ebbe7cd 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;
}