mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-04 17:43:31 +01:00
Merge branch 'maint-0.3.2' into release-0.3.2
This commit is contained in:
commit
cf61d437da
3
changes/ticket26467
Normal file
3
changes/ticket26467
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfixes (memory, correctness):
|
||||||
|
- Fix a number of small memory leaks identified by coverity. Fixes
|
||||||
|
bug 26467; bugfix on numerous Tor versions.
|
@ -3672,6 +3672,7 @@ client_likes_consensus(const struct consensus_cache_entry_t *ent,
|
|||||||
int have = 0;
|
int have = 0;
|
||||||
|
|
||||||
if (consensus_cache_entry_get_voter_id_digests(ent, voters) != 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. */
|
return 1; // We don't know the voters; assume the client won't mind. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1125,6 +1125,7 @@ decode_link_specifiers(const char *encoded)
|
|||||||
sizeof(hs_spec->u.ed25519_id));
|
sizeof(hs_spec->u.ed25519_id));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
tor_free(hs_spec);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,9 @@ hs_helper_build_intro_point(const ed25519_keypair_t *signing_kp, time_t now,
|
|||||||
|
|
||||||
intro_point = ip;
|
intro_point = ip;
|
||||||
done:
|
done:
|
||||||
|
if (intro_point == NULL)
|
||||||
|
tor_free(ip);
|
||||||
|
|
||||||
return intro_point;
|
return intro_point;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +146,9 @@ hs_helper_build_hs_desc_impl(unsigned int no_ip,
|
|||||||
|
|
||||||
descp = desc;
|
descp = desc;
|
||||||
done:
|
done:
|
||||||
|
if (descp == NULL)
|
||||||
|
tor_free(desc);
|
||||||
|
|
||||||
return descp;
|
return descp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,6 +748,8 @@ test_channelpadding_consensus(void *arg)
|
|||||||
tt_i64_op(val, OP_LE, 24*60*60*2);
|
tt_i64_op(val, OP_LE, 24*60*60*2);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
tor_free(relay);
|
||||||
|
|
||||||
free_mock_consensus();
|
free_mock_consensus();
|
||||||
free_fake_channeltls((channel_tls_t*)chan);
|
free_fake_channeltls((channel_tls_t*)chan);
|
||||||
smartlist_free(connection_array);
|
smartlist_free(connection_array);
|
||||||
|
@ -174,6 +174,9 @@ test_link_specifier(void *arg)
|
|||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
hs_desc_link_specifier_t spec;
|
hs_desc_link_specifier_t spec;
|
||||||
smartlist_t *link_specifiers = smartlist_new();
|
smartlist_t *link_specifiers = smartlist_new();
|
||||||
|
char buf[256];
|
||||||
|
char *b64 = NULL;
|
||||||
|
link_specifier_t *ls = NULL;
|
||||||
|
|
||||||
(void) arg;
|
(void) arg;
|
||||||
|
|
||||||
@ -183,9 +186,7 @@ test_link_specifier(void *arg)
|
|||||||
|
|
||||||
/* Test IPv4 for starter. */
|
/* Test IPv4 for starter. */
|
||||||
{
|
{
|
||||||
char *b64, buf[256];
|
|
||||||
uint32_t ipv4;
|
uint32_t ipv4;
|
||||||
link_specifier_t *ls;
|
|
||||||
|
|
||||||
spec.type = LS_IPV4;
|
spec.type = LS_IPV4;
|
||||||
ret = tor_addr_parse(&spec.u.ap.addr, "1.2.3.4");
|
ret = tor_addr_parse(&spec.u.ap.addr, "1.2.3.4");
|
||||||
@ -212,9 +213,7 @@ test_link_specifier(void *arg)
|
|||||||
|
|
||||||
/* Test IPv6. */
|
/* Test IPv6. */
|
||||||
{
|
{
|
||||||
char *b64, buf[256];
|
|
||||||
uint8_t ipv6[16];
|
uint8_t ipv6[16];
|
||||||
link_specifier_t *ls;
|
|
||||||
|
|
||||||
spec.type = LS_IPV6;
|
spec.type = LS_IPV6;
|
||||||
ret = tor_addr_parse(&spec.u.ap.addr, "[1:2:3:4::]");
|
ret = tor_addr_parse(&spec.u.ap.addr, "[1:2:3:4::]");
|
||||||
@ -244,9 +243,7 @@ test_link_specifier(void *arg)
|
|||||||
|
|
||||||
/* Test legacy. */
|
/* Test legacy. */
|
||||||
{
|
{
|
||||||
char *b64, buf[256];
|
|
||||||
uint8_t *id;
|
uint8_t *id;
|
||||||
link_specifier_t *ls;
|
|
||||||
|
|
||||||
spec.type = LS_LEGACY_ID;
|
spec.type = LS_LEGACY_ID;
|
||||||
memset(spec.u.legacy_id, 'Y', sizeof(spec.u.legacy_id));
|
memset(spec.u.legacy_id, 'Y', sizeof(spec.u.legacy_id));
|
||||||
@ -272,6 +269,8 @@ test_link_specifier(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
link_specifier_free(ls);
|
||||||
|
tor_free(b64);
|
||||||
smartlist_free(link_specifiers);
|
smartlist_free(link_specifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user