[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.1] Move free to end of test function so coverity won't complain.



commit cd1f708a7f44ab305c9fcda0060f55f075b98362
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Dec 21 10:39:29 2017 -0500

    Move free to end of test function so coverity won't complain.
---
 src/test/test_circuitmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c
index 130be6fc9..d6b658c27 100644
--- a/src/test/test_circuitmux.c
+++ b/src/test/test_circuitmux.c
@@ -67,7 +67,6 @@ test_cmux_destroy_cell_queue(void *arg)
   dc = destroy_cell_queue_pop(cq);
   tt_assert(dc);
   tt_uint_op(dc->circid, ==, 100);
-  tor_free(dc);
 
   tt_int_op(circuitmux_num_cells(cmux), ==, 2);
 
@@ -75,6 +74,7 @@ test_cmux_destroy_cell_queue(void *arg)
   circuitmux_free(cmux);
   channel_free(ch);
   packed_cell_free(pc);
+  tor_free(dc);
 
 #ifdef ENABLE_MEMPOOLS
   free_cell_pool();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits