]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
bandaid: make Giorgos Pallas's dns assert bug not actually crash on him.
authorRoger Dingledine <arma@torproject.org>
Tue, 4 Jan 2005 06:21:06 +0000 (06:21 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 4 Jan 2005 06:21:06 +0000 (06:21 +0000)
one day we should try to figure out what's actually going on here.

svn:r3280

src/or/dns.c

index 75a45170cf45a94bf1c216a8a897e2b8d6669a39..ac24de24331b77b9dcf183d2f4e22c2394623d28 100644 (file)
@@ -396,6 +396,11 @@ void dns_cancel_pending_resolve(char *address) {
     return;
   }
 
+  if (!resolve->pending_connections) {
+    /* XXX this should never trigger, but sometimes it does */
+    log_fn(LOG_WARN,"Bug: Address '%s' is pending but has no pending connections!", address);
+    return;
+  }
   tor_assert(resolve->pending_connections);
 
   /* mark all pending connections to fail */