Explorar o código

when returning a list of circuits, don't return a list of the same
conn over and over. that's really bad for memory.


svn:r5463

Roger Dingledine %!s(int64=20) %!d(string=hai) anos
pai
achega
1da454a42d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/or/circuitlist.c

+ 1 - 1
src/or/circuitlist.c

@@ -443,7 +443,7 @@ circuit_get_all_on_orconn(connection_t *conn)
   for (circ=global_circuitlist;circ;circ = circ->next) {
     if (!circ->marked_for_close &&
         (circ->p_conn == conn || circ->n_conn == conn))
-      smartlist_add(res, conn);
+      smartlist_add(res, circ);
   }
   return res;
 }