From: Roger Dingledine Date: Tue, 7 Dec 2004 09:11:38 +0000 (+0000) Subject: salvage another 300 bytes per hup X-Git-Tag: tor-0.0.9rc7~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41b809d2aa98bb4381452a926cc489d25553f57e;p=thirdparty%2Ftor.git salvage another 300 bytes per hup svn:r3106 --- diff --git a/src/or/config.c b/src/or/config.c index 5994e6e807..912ab8c83d 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -975,6 +975,8 @@ options_free(or_options_t *options) int i; void *lvalue; + tor_assert(options); + for (i=0; config_vars[i].name; ++i) { lvalue = ((char*)options) + config_vars[i].var_offset; switch (config_vars[i].type) { @@ -1005,6 +1007,7 @@ options_free(or_options_t *options) break; } } + tor_free(options); } /** Return true iff the option var has the same value in o1 diff --git a/src/or/main.c b/src/or/main.c index 33383a4c5a..d981251c3c 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -755,7 +755,7 @@ static int do_hup(void) { log_fn(LOG_ERR,"Reading config failed--see warnings above. For usage, try -h."); return -1; } - options = get_options(); + options = get_options(); /* they have changed now */ if (authdir_mode(options)) { /* reload the approved-routers file */ tor_snprintf(keydir,sizeof(keydir),"%s/approved-routers", options->DataDirectory);