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

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



commit 64e6f6687c8fc275ddc207fa43f29c4213d3cad2
Author: Andrea Shepard <andrea@xxxxxxxxxxxxxx>
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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits