summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-05-28 00:13:42 +0000
committerRoger Dingledine <arma@torproject.org>2003-05-28 00:13:42 +0000
commit2d296afc4228c5dc34d6e4c1f09d08cffdb37313 (patch)
treed67afdf821a183a117b3a2698918e591482a4537 /src
parent091e1c0167defd07d502aaa4d09a1bb6b227b583 (diff)
downloadtor-2d296afc4228c5dc34d6e4c1f09d08cffdb37313.tar.gz
tor-2d296afc4228c5dc34d6e4c1f09d08cffdb37313.zip
bugfix
svn:r297
Diffstat (limited to 'src')
-rw-r--r--src/or/circuit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 3d190de399..e3e42dbd55 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -554,13 +554,13 @@ void circuit_about_to_close_connection(connection_t *conn) {
circ->n_streams = conn->next_stream;
goto send_end;
}
- for(prevconn = circ->p_streams; prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ;
- if(prevconn->next_stream) {
+ for(prevconn = circ->p_streams; prevconn && prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ;
+ if(prevconn && prevconn->next_stream) {
prevconn->next_stream = conn->next_stream;
goto send_end;
}
- for(prevconn = circ->n_streams; prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ;
- if(prevconn->next_stream) {
+ for(prevconn = circ->n_streams; prevconn && prevconn->next_stream && prevconn->next_stream != conn; prevconn = prevconn->next_stream) ;
+ if(prevconn && prevconn->next_stream) {
prevconn->next_stream = conn->next_stream;
goto send_end;
}