[or-cvs] salvage another 300 bytes per hup

Roger Dingledine arma at seul.org
Tue Dec 7 09:11:40 UTC 2004


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	config.c main.c 
Log Message:
salvage another 300 bytes per hup


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -d -r1.282 -r1.283
--- config.c	7 Dec 2004 06:51:46 -0000	1.282
+++ config.c	7 Dec 2004 09:11:38 -0000	1.283
@@ -975,6 +975,8 @@
   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 @@
         break;
     }
   }
+  tor_free(options);
 }
 
 /** Return true iff the option <b>var</b> has the same value in <b>o1</b>

Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.401
retrieving revision 1.402
diff -u -d -r1.401 -r1.402
--- main.c	7 Dec 2004 05:31:37 -0000	1.401
+++ main.c	7 Dec 2004 09:11:38 -0000	1.402
@@ -755,7 +755,7 @@
     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);



More information about the tor-commits mailing list