[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8370: Avoid crash when telling controller stream-status and a stre (in tor/trunk: . src/or)



Author: nickm
Date: 2006-09-11 22:50:14 -0400 (Mon, 11 Sep 2006)
New Revision: 8370

Modified:
   tor/trunk/
   tor/trunk/src/or/control.c
Log:
 r8776@Kushana:  nickm | 2006-09-11 22:49:53 -0400
 Avoid crash when telling controller stream-status and a stream is detached.  Fixes bug 334. Backport candidate.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8776] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2006-09-12 02:24:55 UTC (rev 8369)
+++ tor/trunk/src/or/control.c	2006-09-12 02:50:14 UTC (rev 8370)
@@ -1453,7 +1453,7 @@
           continue;
         }
       circ = circuit_get_by_edge_conn(conn);
-      if (CIRCUIT_IS_ORIGIN(circ))
+      if (circ && CIRCUIT_IS_ORIGIN(circ))
         origin_circ = TO_ORIGIN_CIRCUIT(circ);
       write_stream_target_to_buf(conn, buf, sizeof(buf));
       slen = strlen(buf)+strlen(state)+32;