[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix remaining test warnings. (in test_relay.c)
commit d860b99dbf9f86aa27d7e7fcf161d2b16d838c68
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Sep 8 15:25:56 2016 -0400
Fix remaining test warnings. (in test_relay.c)
---
src/test/test_relay.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/test/test_relay.c b/src/test/test_relay.c
index a7fcad5..29016e4 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);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits