From 717946089b6008e4744522845014dafa1fc4e37c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 11 Feb 2013 14:57:10 -0500 Subject: Resolve memory leaks in the unit tests and benchmarks (found by coverity) These shouldn't really matter, but it's nice to be leak-free. --- src/test/bench.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/test/bench.c') diff --git a/src/test/bench.c b/src/test/bench.c index d57aeb81aa..18a5154e11 100644 --- a/src/test/bench.c +++ b/src/test/bench.c @@ -164,6 +164,7 @@ bench_onion_TAP(void) int s; dh = crypto_dh_dup(dh_out); s = onion_skin_TAP_client_handshake(dh, or, key_out, sizeof(key_out)); + crypto_dh_free(dh); tor_assert(s == 0); } end = perftime(); @@ -203,6 +204,7 @@ bench_onion_ntor(void) end = perftime(); printf("Client-side, part 1: %f usec.\n", NANOCOUNT(start, end, iters)/1e3); + state = NULL; onion_skin_ntor_create(nodeid, &keypair1.pubkey, &state, os); start = perftime(); for (i = 0; i < iters; ++i) { -- cgit v1.2.3-54-g00ecf