summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-08 19:50:41 -0700
committerAndrea Shepard <andrea@torproject.org>2012-10-08 19:50:41 -0700
commit64e6f6687c8fc275ddc207fa43f29c4213d3cad2 (patch)
treee22dca95cf3d2be1740c620ddea76b8101007b62 /src/or
parente709fe320a872d8ddbeb62c029cec0246eeabc39 (diff)
downloadtor-64e6f6687c8fc275ddc207fa43f29c4213d3cad2.tar.gz
tor-64e6f6687c8fc275ddc207fa43f29c4213d3cad2.zip
channel_free() should be a no-op
Diffstat (limited to 'src/or')
-rw-r--r--src/or/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 2fe4466e53..690bfb92a7 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);