]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test/shared-random: Stop leaking shared random state in the unit tests
authorteor <teor@torproject.org>
Tue, 26 Feb 2019 12:14:30 +0000 (22:14 +1000)
committerteor <teor@torproject.org>
Wed, 27 Feb 2019 05:04:40 +0000 (15:04 +1000)
Stop leaking parts of the shared random state in the shared-random unit
tests.

Fixes bug 29599; bugfix on 0.2.9.1-alpha.

changes/bug29599 [new file with mode: 0644]
src/test/test_shared_random.c

diff --git a/changes/bug29599 b/changes/bug29599
new file mode 100644 (file)
index 0000000..14e2f5d
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (memory management, testing):
+    - Stop leaking parts of the shared random state in the shared-random unit
+      tests. Fixes bug 29599; bugfix on 0.2.9.1-alpha.
index 6a8c1abaffcf0dd840e01052c69961559f9b9db2..cebe772d94b4965f6500f5ed44792a71916a1595 100644 (file)
@@ -594,8 +594,8 @@ test_vote(void *arg)
   }
 
  done:
-  sr_commit_free(our_commit);
   UNMOCK(trusteddirserver_get_by_v3_auth_digest);
+  sr_state_free();
 }
 
 static const char *sr_state_str = "Version 1\n"
@@ -829,6 +829,7 @@ test_sr_compute_srv(void *arg)
 
  done:
   UNMOCK(trusteddirserver_get_by_v3_auth_digest);
+  sr_state_free();
 }
 
 /** Return a minimal vote document with a current SRV value set to
@@ -1094,7 +1095,7 @@ test_state_transition(void *arg)
   }
 
  done:
-  return;
+  sr_state_free();
 }
 
 static void