]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix memory leak in test_sr_setup_commits().
authorAlexander Færøy <ahf@torproject.org>
Sat, 23 Jun 2018 09:31:59 +0000 (11:31 +0200)
committerAlexander Færøy <ahf@torproject.org>
Sat, 23 Jun 2018 11:11:03 +0000 (13:11 +0200)
This patch fixes a memory leak in test_sr_setup_commits() where the
place_holder is allocated, but never freed again.

See: Coverity CID 1437440.

src/test/test_shared_random.c

index 056f199b9460b41bda53837045c835936cda46cb..5f86d783aff48c7c6bfc5d2dc3efaeee85fa66e2 100644 (file)
@@ -788,6 +788,7 @@ test_sr_setup_commits(void)
   tt_assert(!commit_has_reveal_value(commit_d));
 
  done:
+  tor_free(place_holder);
   authority_cert_free(auth_cert);
 }