aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-02-27 09:59:33 -0500
committerNick Mathewson <nickm@torproject.org>2019-02-27 09:59:33 -0500
commit56f01e58b43176b439ade122aa38adcee73d24d5 (patch)
treebeed0b2c0e71ef563f06fff624bb6791ace15ab1
parentef2925e742d35be6558c1223fd4718077138cca9 (diff)
parentd4b7975ce70fc93671136445c95c2009408cfe70 (diff)
downloadtor-56f01e58b43176b439ade122aa38adcee73d24d5.tar.gz
tor-56f01e58b43176b439ade122aa38adcee73d24d5.zip
Merge remote-tracking branch 'tor-github/pr/731' into maint-0.4.0
-rw-r--r--changes/bug295993
-rw-r--r--src/test/test_shared_random.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/changes/bug29599 b/changes/bug29599
new file mode 100644
index 0000000000..14e2f5d077
--- /dev/null
+++ b/changes/bug29599
@@ -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.
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 617c76542e..68e5498a78 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -738,8 +738,8 @@ test_vote(void *arg)
}
done:
- sr_commit_free(our_commit);
UNMOCK(trusteddirserver_get_by_v3_auth_digest);
+ sr_state_free_all();
}
static const char *sr_state_str = "Version 1\n"
@@ -975,6 +975,7 @@ test_sr_compute_srv(void *arg)
done:
UNMOCK(trusteddirserver_get_by_v3_auth_digest);
+ sr_state_free_all();
}
/** Return a minimal vote document with a current SRV value set to
@@ -1240,7 +1241,7 @@ test_state_transition(void *arg)
}
done:
- return;
+ sr_state_free_all();
}
static void