diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-06 12:35:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-06 12:35:37 -0400 |
commit | 5927ed8d3324c39fd8aa3d496d119b37b97a1d73 (patch) | |
tree | 60fd91a8aaeaf9406658402537b350f7813563b6 /src/or/channel.c | |
parent | 4e3f9c1f3af6292f30799f005f6df8f9c1bc7fee (diff) | |
download | tor-5927ed8d3324c39fd8aa3d496d119b37b97a1d73.tar.gz tor-5927ed8d3324c39fd8aa3d496d119b37b97a1d73.zip |
checkSpace.pl now forbids more identifiers.
The functions it warns about are:
assert, memcmp, strcat, strcpy, sprintf, malloc, free, realloc,
strdup, strndup, calloc.
Also, fix a few lingering instances of these in the code. Use other
conventions to indicate _intended_ use of assert and
malloc/realloc/etc.
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 87fa721089..6a78b21988 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -838,7 +838,7 @@ channel_free(channel_t *chan) } /* Call a free method if there is one */ - if (chan->free) chan->free(chan); + if (chan->free_fn) chan->free_fn(chan); channel_clear_remote_end(chan); @@ -878,7 +878,7 @@ channel_listener_free(channel_listener_t *chan_l) tor_assert(!(chan_l->registered)); /* Call a free method if there is one */ - if (chan_l->free) chan_l->free(chan_l); + if (chan_l->free_fn) chan_l->free_fn(chan_l); /* * We're in CLOSED or ERROR, so the incoming channel queue is already @@ -916,7 +916,7 @@ channel_force_free(channel_t *chan) } /* Call a free method if there is one */ - if (chan->free) chan->free(chan); + if (chan->free_fn) chan->free_fn(chan); channel_clear_remote_end(chan); @@ -958,7 +958,7 @@ channel_listener_force_free(channel_listener_t *chan_l) chan_l); /* Call a free method if there is one */ - if (chan_l->free) chan_l->free(chan_l); + if (chan_l->free_fn) chan_l->free_fn(chan_l); /* * The incoming list just gets emptied and freed; we request close on |