From 6f41b06b4b227e95893e04cb949998a03d4a4dab Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 13 Sep 2003 21:53:38 +0000 Subject: [PATCH] fix two more bugs svn:r452 --- trunk/src/or/main.c | 3 ++- trunk/src/or/or.h | 2 +- trunk/src/or/routers.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/trunk/src/or/main.c b/trunk/src/or/main.c index 3ad95e3b93..6b12777205 100644 --- a/trunk/src/or/main.c +++ b/trunk/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/trunk/src/or/or.h b/trunk/src/or/or.h index 87651872ac..e508f3c9e1 100644 --- a/trunk/src/or/or.h +++ b/trunk/src/or/or.h @@ -7,7 +7,7 @@ #include "orconfig.h" -//#define USE_TLS +#define USE_TLS #include #include diff --git a/trunk/src/or/routers.c b/trunk/src/or/routers.c index a1b8289b67..b1ebbe7cd4 100644 --- a/trunk/src/or/routers.c +++ b/trunk/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; }