[or-cvs] fix two more bugs

Roger Dingledine arma at seul.org
Sat Sep 13 21:53:41 UTC 2003


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

Modified Files:
	main.c or.h routers.c 
Log Message:
fix two more bugs


Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- main.c	8 Sep 2003 10:59:00 -0000	1.90
+++ main.c	13 Sep 2003 21:53:38 -0000	1.91
@@ -553,8 +553,9 @@
       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 */
 }

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- or.h	12 Sep 2003 22:45:31 -0000	1.122
+++ or.h	13 Sep 2003 21:53:38 -0000	1.123
@@ -7,7 +7,7 @@
 
 #include "orconfig.h"
 
-//#define USE_TLS
+#define USE_TLS
 
 #include <stdio.h>
 #include <stdlib.h>

Index: routers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routers.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- routers.c	11 Sep 2003 20:32:15 -0000	1.45
+++ routers.c	13 Sep 2003 21:53:38 -0000	1.46
@@ -188,7 +188,8 @@
   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 @@
   *dest = (directory_t *)tor_malloc(sizeof(directory_t));
   (*dest)->routers = rarray;
   (*dest)->n_routers = rarray_len;
+  (*dest)->software_versions = NULL;
   return 0;
 }
 



More information about the tor-commits mailing list