]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
salvage another 300 bytes per hup
authorRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 09:11:38 +0000 (09:11 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 7 Dec 2004 09:11:38 +0000 (09:11 +0000)
svn:r3106

src/or/config.c
src/or/main.c

index 5994e6e8071e8cb267f9a4fbce0dd2dceca29d30..912ab8c83deadbbf6053cea6e5deca0131b29741 100644 (file)
@@ -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 <b>var</b> has the same value in <b>o1</b>
index 33383a4c5a71f99470fa0dfde30f05dcec83a67b..d981251c3c1a28786fc106ffb8786e8567614ac4 100644 (file)
@@ -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);