diff options
Diffstat (limited to 'src/test/test_relay.c')
-rw-r--r-- | src/test/test_relay.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test_relay.c b/src/test/test_relay.c index 38d1d96703..fbe7fafc06 100644 --- a/src/test/test_relay.c +++ b/src/test/test_relay.c @@ -111,15 +111,14 @@ test_relay_append_cell_to_circuit_queue(void *arg) /* Shut down channels */ channel_free_all(); - nchan = pchan = NULL; done: tor_free(cell); + cell_queue_clear(&orcirc->base_.n_chan_cells); + cell_queue_clear(&orcirc->p_chan_cells); tor_free(orcirc); - if (nchan && nchan->cmux) circuitmux_free(nchan->cmux); - tor_free(nchan); - if (pchan && pchan->cmux) circuitmux_free(pchan->cmux); - tor_free(pchan); + free_fake_channel(nchan); + free_fake_channel(pchan); #ifdef ENABLE_MEMPOOLS free_cell_pool(); #endif /* ENABLE_MEMPOOLS */ |