Commit a24b9e60 authored by Sebastian Hahn's avatar Sebastian Hahn Committed by Nick Mathewson
Browse files

Fix a memleak

Found by coverity

test_mem_op_hex was leaking memory, which showed up in a few
tests.

Also, the dir_param test had a memleak of its own.

Found by Coverity
parent 6a68b505
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@
  tor_assert((length&1)==0);                                            \
  base16_decode(value2, length/2, hex, length);                         \
  test_mem_op(expr1, op, value2, length/2);                             \
  tor_free(value2);                                                     \
  STMT_END

#define test_memeq_hex(expr1, hex) test_mem_op_hex(expr1, ==, hex)
+1 −0
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ test_dir_param_voting(void)
  smartlist_free(vote2.net_params);
  smartlist_free(vote3.net_params);
  smartlist_free(vote4.net_params);
  smartlist_free(votes);

  return;
}