aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/dirauth/shared_random_state.c1
-rw-r--r--src/or/routerlist.c1
-rw-r--r--src/test/test_hs.c7
-rw-r--r--src/test/test_shared_random.c1
4 files changed, 8 insertions, 2 deletions
diff --git a/src/or/dirauth/shared_random_state.c b/src/or/dirauth/shared_random_state.c
index f77a64dfc9..c30a024425 100644
--- a/src/or/dirauth/shared_random_state.c
+++ b/src/or/dirauth/shared_random_state.c
@@ -373,6 +373,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/or/routerlist.c b/src/or/routerlist.c
index 68fd763441..98e1f69bb8 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2784,6 +2784,7 @@ frac_nodes_with_descriptors(const smartlist_t *sl,
if (node_has_preferred_descriptor(node, for_direct_conn))
n_with_descs++;
});
+ tor_free(bandwidths);
return ((double)n_with_descs) / smartlist_len(sl);
}
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index 166faa8928..84598d9cc4 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -573,10 +573,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;
@@ -622,6 +622,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 55910a351e..fbf505cc9a 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -886,6 +886,7 @@ test_sr_setup_commits(void)
tt_assert(!commit_has_reveal_value(commit_d));
done:
+ tor_free(place_holder);
authority_cert_free(auth_cert);
}