]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
channel_free() should be a no-op
authorAndrea Shepard <andrea@torproject.org>
Tue, 9 Oct 2012 02:50:41 +0000 (19:50 -0700)
committerAndrea Shepard <andrea@torproject.org>
Tue, 9 Oct 2012 02:50:41 +0000 (19:50 -0700)
src/or/channel.c

index 2fe4466e53efbdaee409260e840fc49033783563..690bfb92a72e05cf894b329c700eaeffc1579e7b 100644 (file)
@@ -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);