]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory error in test_shared_random
authorNick Mathewson <nickm@torproject.org>
Fri, 29 Jun 2018 17:49:02 +0000 (13:49 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 29 Jun 2018 17:49:02 +0000 (13:49 -0400)
Bug not in any released Tor.

src/test/test_shared_random.c

index 5f86d783aff48c7c6bfc5d2dc3efaeee85fa66e2..6a8c1abaffcf0dd840e01052c69961559f9b9db2 100644 (file)
@@ -780,6 +780,7 @@ test_sr_setup_commits(void)
   /* Now during REVEAL phase save commit D by restoring its reveal. */
   set_sr_phase(SR_PHASE_REVEAL);
   save_commit_to_state(place_holder);
+  place_holder = NULL;
   tt_str_op(commit_d->encoded_reveal, OP_EQ,
             "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
   /* Go back to an empty encoded reveal value. */