mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Fix memory-counting error in rephist.c. Bug 18651. (Now with actual patch)
This commit is contained in:
parent
c4e5296892
commit
9604a5ba91
@ -1793,6 +1793,7 @@ rep_hist_remove_predicted_ports(const smartlist_t *rmv_ports)
|
|||||||
SMARTLIST_FOREACH_BEGIN(predicted_ports_list, predicted_port_t *, pp) {
|
SMARTLIST_FOREACH_BEGIN(predicted_ports_list, predicted_port_t *, pp) {
|
||||||
if (bitarray_is_set(remove_ports, pp->port)) {
|
if (bitarray_is_set(remove_ports, pp->port)) {
|
||||||
tor_free(pp);
|
tor_free(pp);
|
||||||
|
rephist_total_alloc -= sizeof(*pp);
|
||||||
SMARTLIST_DEL_CURRENT(predicted_ports_list, pp);
|
SMARTLIST_DEL_CURRENT(predicted_ports_list, pp);
|
||||||
}
|
}
|
||||||
} SMARTLIST_FOREACH_END(pp);
|
} SMARTLIST_FOREACH_END(pp);
|
||||||
|
Loading…
Reference in New Issue
Block a user