@@ -3499,6 +3499,7 @@ client_likes_consensus(const struct consensus_cache_entry_t *ent,
int have = 0;
if (consensus_cache_entry_get_voter_id_digests(ent, voters) != 0) {
+ smartlist_free(voters);
return 1; // We don't know the voters; assume the client won't mind. */
}
@@ -85,6 +85,9 @@ hs_helper_build_intro_point(const ed25519_keypair_t *signing_kp, time_t now,
intro_point = ip;
done:
+ if (intro_point == NULL)
+ tor_free(ip);
+
return intro_point;
@@ -139,6 +142,9 @@ hs_helper_build_hs_desc_impl(unsigned int no_ip,
descp = desc;
+ if (descp == NULL)
+ tor_free(desc);
return descp;
@@ -745,6 +745,8 @@ test_channelpadding_consensus(void *arg)
tt_i64_op(val, OP_LE, 24*60*60*2);
+ tor_free(relay);
free_mock_consensus();
free_fake_channeltls((channel_tls_t*)chan);
smartlist_free(connection_array);