diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:00:56 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-29 13:00:56 -0400 |
commit | 1385a5118d55edd3dd672eeb793b662853f30758 (patch) | |
tree | 86b5138cee8ca281830e72cc842b539618d18554 | |
parent | d6d3f8486dbac9837a793f431dcd58505e7274e4 (diff) | |
parent | b426e83f077d57e14fc77ebae18a3637bb2c752a (diff) | |
download | tor-1385a5118d55edd3dd672eeb793b662853f30758.tar.gz tor-1385a5118d55edd3dd672eeb793b662853f30758.zip |
Merge branch 'maint-0.2.9' into maint-0.3.1
-rw-r--r-- | src/or/routerlist.c | 2 | ||||
-rw-r--r-- | src/or/shared_random_state.c | 1 | ||||
-rw-r--r-- | src/test/test_hs.c | 7 | ||||
-rw-r--r-- | src/test/test_shared_random.c | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index c7beec77b7..2ca5199f3c 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2758,6 +2758,8 @@ frac_nodes_with_descriptors(const smartlist_t *sl, if (node_has_descriptor(node)) n_with_descs++; }); + + tor_free(bandwidths); return ((double)n_with_descs) / (double)smartlist_len(sl); } diff --git a/src/or/shared_random_state.c b/src/or/shared_random_state.c index 89d2e8d7f6..a147f5a347 100644 --- a/src/or/shared_random_state.c +++ b/src/or/shared_random_state.c @@ -409,6 +409,7 @@ disk_state_parse_commits(sr_state_t *state, if (commit == NULL) { /* Ignore badly formed commit. It could also be a authority * fingerprint that we don't know about so it shouldn't be used. */ + smartlist_free(args); continue; } /* We consider parseable commit from our disk state to be valid because diff --git a/src/test/test_hs.c b/src/test/test_hs.c index 5aae6c5b97..cd71f025a3 100644 --- a/src/test/test_hs.c +++ b/src/test/test_hs.c @@ -476,10 +476,10 @@ test_hs_auth_cookies(void *arg) #define TEST_COOKIE_ENCODED_STEALTH "YWJjZGVmZ2hpamtsbW5vcB" #define TEST_COOKIE_ENCODED_INVALID "YWJjZGVmZ2hpamtsbW5vcD" - char *encoded_cookie; + char *encoded_cookie = NULL; uint8_t raw_cookie[REND_DESC_COOKIE_LEN]; rend_auth_type_t auth_type; - char *err_msg; + char *err_msg = NULL; int re; (void)arg; @@ -525,6 +525,9 @@ test_hs_auth_cookies(void *arg) tor_free(err_msg); done: + tor_free(encoded_cookie); + tor_free(err_msg); + return; } diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c index 026a0f3825..c8b0383582 100644 --- a/src/test/test_shared_random.c +++ b/src/test/test_shared_random.c @@ -788,6 +788,7 @@ test_sr_setup_commits(void) tt_assert(!commit_has_reveal_value(commit_d)); done: + tor_free(place_holder); authority_cert_free(auth_cert); } |