mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-20 13:06:20 +02:00
bugfix: don't segfault if there's no valid circuit open
svn:r253
This commit is contained in:
parent
f8c6339979
commit
ffae44aafd
@ -95,15 +95,14 @@ int ap_handshake_process_socks(connection_t *conn) {
|
||||
|
||||
/* find the circuit that we should use, if there is one. */
|
||||
circ = circuit_get_newest_by_edge_type(EDGE_AP);
|
||||
circ->dirty = 1;
|
||||
|
||||
/* now we're all ready to make an onion or send a begin */
|
||||
|
||||
if(!circ) {
|
||||
log(LOG_INFO,"ap_handshake_process_socks(): No circuit ready. Closing.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
circ->dirty = 1;
|
||||
|
||||
/* add it into the linked list of topics on this circuit */
|
||||
log(LOG_DEBUG,"ap_handshake_process_socks(): attaching new conn to circ. n_aci %d.", circ->n_aci);
|
||||
conn->next_topic = circ->p_conn;
|
||||
|
Loading…
Reference in New Issue
Block a user