diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:58:43 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-08 14:58:43 -0500 |
commit | 5ee0cccd49e57fad8c810e817d912d4a61dbc96c (patch) | |
tree | 2aa4d71a332805bcb1bf7746887e7435ffdc51f4 /src/or/channel.h | |
parent | 44010c6fc11608b13924372a179825946672cb23 (diff) | |
parent | 7ca5f4bf0365b853cdb0bab5cc9cb0ce6deaec26 (diff) | |
download | tor-5ee0cccd49e57fad8c810e817d912d4a61dbc96c.tar.gz tor-5ee0cccd49e57fad8c810e817d912d4a61dbc96c.zip |
Merge branch 'macro_free_v2_squashed'
Diffstat (limited to 'src/or/channel.h')
-rw-r--r-- | src/or/channel.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/channel.h b/src/or/channel.h index d88a77c9ae..0f685011a3 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -458,8 +458,11 @@ void channel_close_for_error(channel_t *chan); void channel_closed(channel_t *chan); /* Free a channel */ -void channel_free(channel_t *chan); -void channel_listener_free(channel_listener_t *chan_l); +void channel_free_(channel_t *chan); +#define channel_free(chan) FREE_AND_NULL(channel_t, channel_free_, (chan)) +void channel_listener_free_(channel_listener_t *chan_l); +#define channel_listener_free(chan_l) \ + FREE_AND_NULL(channel_listener_t, channel_listener_free_, (chan_l)) /* State/metadata setters */ @@ -634,6 +637,8 @@ int packed_cell_is_destroy(channel_t *chan, /* Declare the handle helpers */ HANDLE_DECL(channel, channel_s,) +#define channel_handle_free(h) \ + FREE_AND_NULL(channel_handle_t, channel_handle_free_, (h)) #endif /* !defined(TOR_CHANNEL_H) */ |