From: Roger Dingledine Date: Sat, 13 Sep 2003 21:53:38 +0000 (+0000) Subject: fix two more bugs X-Git-Tag: tor-0.0.2pre8~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=05612786e47678427257136217d8aff85f687b5a;p=thirdparty%2Ftor.git fix two more bugs svn:r452 --- 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 #include 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; }