소스 검색

Move free to end of test function so coverity won't complain.

Nick Mathewson 6 년 전
부모
커밋
cd1f708a7f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/test/test_circuitmux.c

+ 1 - 1
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();