[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] stop client_dns_clean from calling malloc(0)



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

Modified Files:
	connection_edge.c 
Log Message:
stop client_dns_clean from calling malloc(0)


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- connection_edge.c	17 Nov 2003 07:37:45 -0000	1.62
+++ connection_edge.c	18 Nov 2003 00:02:24 -0000	1.63
@@ -902,6 +902,8 @@
   time_t now;
   int i;
 
+  if(!client_dns_size)
+    return;
   expired_entries = tor_malloc(client_dns_size * 
                                sizeof(struct client_dns_entry *));