channel_free() should be a no-op

This commit is contained in:
Andrea Shepard 2012-10-08 19:50:41 -07:00
parent e709fe320a
commit 64e6f6687c
No known key found for this signature in database
GPG Key ID: 80BF498218A1E61B

View File

@ -763,7 +763,8 @@ channel_init_listener(channel_t *chan)
void void
channel_free(channel_t *chan) channel_free(channel_t *chan)
{ {
tor_assert(chan); if (!chan) return;
/* It must be closed or errored */ /* It must be closed or errored */
tor_assert(chan->state == CHANNEL_STATE_CLOSED || tor_assert(chan->state == CHANNEL_STATE_CLOSED ||
chan->state == CHANNEL_STATE_ERROR); chan->state == CHANNEL_STATE_ERROR);