mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
fix bug 245: When modifying the orconn_circid_map map, we would
sometimes decrement conn->n_circuits even when there was no circuit originally. This caused conn->n_circuits to go negative. We noticed this because we were checking if connections can be closed based on conn->n_circuits == 0, so we were never closing any connection that had ever had a circuit on it. svn:r5931
This commit is contained in:
parent
1c596156aa
commit
2c221dd8db
@ -112,8 +112,8 @@ circuit_set_circid_orconn(circuit_t *circ, uint16_t id,
|
||||
found = HT_REMOVE(orconn_circid_map, &orconn_circid_circuit_map, &search);
|
||||
if (found) {
|
||||
tor_free(found);
|
||||
--old_conn->n_circuits;
|
||||
}
|
||||
--old_conn->n_circuits;
|
||||
}
|
||||
|
||||
if (conn == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user