Преглед на файлове

fix an assert trigger in cvs: if a resolve request fails, and the circuit
has vanished in the meantime, then we would both mark it for close
(i.e. put it on the closeable list) and also immediately free it.


svn:r3759

Roger Dingledine преди 20 години
родител
ревизия
316afb6d09
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/or/dns.c

+ 2 - 1
src/or/dns.c

@@ -277,7 +277,8 @@ int dns_resolve(connection_t *exitconn) {
         circ = circuit_get_by_conn(exitconn);
         if (circ)
           circuit_detach_stream(circ, exitconn);
-        connection_free(exitconn);
+        if (!exitconn->marked_for_close)
+          connection_free(exitconn);
         return -1;
     }
     tor_assert(0);