diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-08 15:25:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-08 15:25:56 -0400 |
commit | d860b99dbf9f86aa27d7e7fcf161d2b16d838c68 (patch) | |
tree | 1d25e3023a6e656759eebeece1a66a6f210c6ee6 /src/test/test_relay.c | |
parent | 3fcd5d71ad3b8b05b60ef5b3a7a62c3d53625d55 (diff) | |
download | tor-d860b99dbf9f86aa27d7e7fcf161d2b16d838c68.tar.gz tor-d860b99dbf9f86aa27d7e7fcf161d2b16d838c68.zip |
Fix remaining test warnings. (in test_relay.c)
Diffstat (limited to 'src/test/test_relay.c')
-rw-r--r-- | src/test/test_relay.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_relay.c b/src/test/test_relay.c index a7fcad5401..29016e444b 100644 --- a/src/test/test_relay.c +++ b/src/test/test_relay.c @@ -74,6 +74,10 @@ test_relay_append_cell_to_circuit_queue(void *arg) /* Make a fake orcirc */ orcirc = new_fake_orcirc(nchan, pchan); tt_assert(orcirc); + circuitmux_attach_circuit(nchan->cmux, TO_CIRCUIT(orcirc), + CELL_DIRECTION_OUT); + circuitmux_attach_circuit(pchan->cmux, TO_CIRCUIT(orcirc), + CELL_DIRECTION_IN); /* Make a cell */ cell = tor_malloc_zero(sizeof(cell_t)); @@ -111,6 +115,10 @@ test_relay_append_cell_to_circuit_queue(void *arg) tor_free(cell); cell_queue_clear(&orcirc->base_.n_chan_cells); cell_queue_clear(&orcirc->p_chan_cells); + if (orcirc) { + circuitmux_detach_circuit(nchan->cmux, TO_CIRCUIT(orcirc)); + circuitmux_detach_circuit(pchan->cmux, TO_CIRCUIT(orcirc)); + } tor_free(orcirc); free_fake_channel(nchan); free_fake_channel(pchan); |