Przeglądaj źródła

Fix memory leak in test_sr_setup_commits().

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.
Alexander Færøy 6 lat temu
rodzic
commit
8ec6b36dca
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/test/test_shared_random.c

+ 1 - 0
src/test/test_shared_random.c

@@ -788,6 +788,7 @@ test_sr_setup_commits(void)
   tt_assert(!commit_has_reveal_value(commit_d));
   tt_assert(!commit_has_reveal_value(commit_d));
 
 
  done:
  done:
+  tor_free(place_holder);
   authority_cert_free(auth_cert);
   authority_cert_free(auth_cert);
 }
 }