mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 18:22:09 +01:00
r12317@catbus: nickm | 2007-04-09 15:50:51 -0400
Fix second part of bug 411 (which was actually a separate bug): it isnt safe to clear a cell queue while the circuit is active. svn:r9928
This commit is contained in:
parent
f36c613dbc
commit
eb95ff9ba9
@ -398,19 +398,23 @@ circuit_free(circuit_t *circ)
|
|||||||
other->rend_splice = NULL;
|
other->rend_splice = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cell_queue_clear(ô->p_conn_cells);
|
|
||||||
|
|
||||||
tor_free(circ->onionskin);
|
tor_free(circ->onionskin);
|
||||||
|
|
||||||
/* remove from map. */
|
/* remove from map. */
|
||||||
circuit_set_p_circid_orconn(ocirc, 0, NULL);
|
circuit_set_p_circid_orconn(ocirc, 0, NULL);
|
||||||
}
|
|
||||||
|
|
||||||
cell_queue_clear(&circ->n_conn_cells);
|
/* Clear cell queue _after_ removing it from the map. Otherwise our
|
||||||
|
* "active" checks will be violated. */
|
||||||
|
cell_queue_clear(ô->p_conn_cells);
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove from map. */
|
/* Remove from map. */
|
||||||
circuit_set_n_circid_orconn(circ, 0, NULL);
|
circuit_set_n_circid_orconn(circ, 0, NULL);
|
||||||
|
|
||||||
|
/* Clear cell queue _after_ removing it from the map. Otherwise our
|
||||||
|
* "active" checks will be violated. */
|
||||||
|
cell_queue_clear(&circ->n_conn_cells);
|
||||||
|
|
||||||
memset(circ, 0xAA, sizeof(circuit_t)); /* poison memory */
|
memset(circ, 0xAA, sizeof(circuit_t)); /* poison memory */
|
||||||
tor_free(mem);
|
tor_free(mem);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user