diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-01-18 14:29:52 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-18 14:29:52 -0500 |
commit | 9d47f4d298553cbbafa5afb65e4972bff0b3024a (patch) | |
tree | 3f92307c4d3538027646b3cde75d32eac410752e | |
parent | fa00f2dce5a93164e36860794b75c595067c2f63 (diff) | |
download | tor-9d47f4d298553cbbafa5afb65e4972bff0b3024a.tar.gz tor-9d47f4d298553cbbafa5afb65e4972bff0b3024a.zip |
Fix a memory leak in bench.c
-rw-r--r-- | src/test/bench.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/bench.c b/src/test/bench.c index 30984fda70..99bc686f30 100644 --- a/src/test/bench.c +++ b/src/test/bench.c @@ -120,7 +120,7 @@ bench_onion_TAP(void) uint64_t start, end; char os[TAP_ONIONSKIN_CHALLENGE_LEN]; char or[TAP_ONIONSKIN_REPLY_LEN]; - crypto_dh_t *dh_out; + crypto_dh_t *dh_out = NULL; key = crypto_pk_new(); key2 = crypto_pk_new(); @@ -175,6 +175,7 @@ bench_onion_TAP(void) NANOCOUNT(start, end, iters)/1e3); done: + crypto_dh_free(dh_out); crypto_pk_free(key); crypto_pk_free(key2); } |