summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-28 07:40:20 -0400
committerNick Mathewson <nickm@torproject.org>2016-03-28 07:40:20 -0400
commit9604a5ba91c5afb082b30cc542341959da100cbe (patch)
tree7157521900c1c09b82426e73d1dc9ce2685ea251
parentc4e5296892941490c974291f45c2c95132f88370 (diff)
downloadtor-9604a5ba91c5afb082b30cc542341959da100cbe.tar.gz
tor-9604a5ba91c5afb082b30cc542341959da100cbe.zip
Fix memory-counting error in rephist.c. Bug 18651. (Now with actual patch)
-rw-r--r--src/or/rephist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 8654cd3085..fe0ca91c25 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -1793,6 +1793,7 @@ rep_hist_remove_predicted_ports(const smartlist_t *rmv_ports)
SMARTLIST_FOREACH_BEGIN(predicted_ports_list, predicted_port_t *, pp) {
if (bitarray_is_set(remove_ports, pp->port)) {
tor_free(pp);
+ rephist_total_alloc -= sizeof(*pp);
SMARTLIST_DEL_CURRENT(predicted_ports_list, pp);
}
} SMARTLIST_FOREACH_END(pp);