[tor-commits] [tor/master] channel_free() should be a no-op

andrea at torproject.org andrea at torproject.org
Thu Oct 11 02:05:23 UTC 2012


commit 64e6f6687c8fc275ddc207fa43f29c4213d3cad2
Author: Andrea Shepard <andrea at torproject.org>
Date:   Mon Oct 8 19:50:41 2012 -0700

    channel_free() should be a no-op
---
 src/or/channel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/or/channel.c b/src/or/channel.c
index 2fe4466..690bfb9 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -763,7 +763,8 @@ channel_init_listener(channel_t *chan)
 void
 channel_free(channel_t *chan)
 {
-  tor_assert(chan);
+  if (!chan) return;
+
   /* It must be closed or errored */
   tor_assert(chan->state == CHANNEL_STATE_CLOSED ||
              chan->state == CHANNEL_STATE_ERROR);





More information about the tor-commits mailing list