[tor-commits] [tor/master] Fix memory-counting error in rephist.c. Bug 18651. (Now with actual patch)

nickm at torproject.org nickm at torproject.org
Mon Mar 28 11:40:22 UTC 2016


commit 9604a5ba91c5afb082b30cc542341959da100cbe
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Mar 28 07:40:20 2016 -0400

    Fix memory-counting error in rephist.c. Bug 18651. (Now with actual patch)
---
 src/or/rephist.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/or/rephist.c b/src/or/rephist.c
index 8654cd3..fe0ca91 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);



More information about the tor-commits mailing list