소스 검색

Fix a memory error in test_shared_random

Bug not in any released Tor.
Nick Mathewson 6 년 전
부모
커밋
3c0a63c40f
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/test/test_shared_random.c

+ 1 - 0
src/test/test_shared_random.c

@@ -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. */