tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 15e55a72c96d069ac2551856be5b7d5efdb617db
parent f5ff1a38671efd75722ef9a36d4e82450b7ae96a
Author: Nick Mathewson <nickm@torproject.org>
Date:   Mon, 21 Apr 2025 15:13:36 -0400

Use FREE_AND_NULL with conflux_msg_t.

Diffstat:
Msrc/core/or/conflux.c | 2+-
Msrc/core/or/conflux.h | 4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/core/or/conflux.c b/src/core/or/conflux.c @@ -917,7 +917,7 @@ conflux_dequeue_relay_msg(conflux_t *cfx) /** Free a given conflux msg object. */ void -conflux_relay_msg_free(conflux_msg_t *msg) +conflux_relay_msg_free_(conflux_msg_t *msg) { if (msg) { relay_msg_free(msg->msg); diff --git a/src/core/or/conflux.h b/src/core/or/conflux.h @@ -63,7 +63,9 @@ bool conflux_process_relay_msg(conflux_t *cfx, circuit_t *in_circ, conflux_msg_t *conflux_dequeue_relay_msg(conflux_t *cfx); void conflux_note_cell_sent(conflux_t *cfx, circuit_t *circ, uint8_t relay_command); -void conflux_relay_msg_free(conflux_msg_t *msg); +void conflux_relay_msg_free_(conflux_msg_t *msg); +#define conflux_relay_msg_free(msg) \ + FREE_AND_NULL(conflux_msg_t, conflux_relay_msg_free_, (msg)) /* Private section starts. */ #ifdef TOR_CONFLUX_PRIVATE