Selaa lähdekoodia

stop client_dns_clean from calling malloc(0)

svn:r831
Roger Dingledine 20 vuotta sitten
vanhempi
commit
51de02bcb5
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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;
   int i;
 
+  if(!client_dns_size)
+    return;
   expired_entries = tor_malloc(client_dns_size * 
                                sizeof(struct client_dns_entry *));