Browse Source

stop client_dns_clean from calling malloc(0)

svn:r831
Roger Dingledine 22 years ago
parent
commit
51de02bcb5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/or/connection_edge.c

+ 2 - 0
src/or/connection_edge.c

@@ -902,6 +902,8 @@ void client_dns_clean(void)
   time_t now;
   time_t now;
   int i;
   int i;
 
 
+  if(!client_dns_size)
+    return;
   expired_entries = tor_malloc(client_dns_size * 
   expired_entries = tor_malloc(client_dns_size * 
                                sizeof(struct client_dns_entry *));
                                sizeof(struct client_dns_entry *));