]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix memory-counting error in rephist.c. Bug 18651. (Now with actual patch)
authorNick Mathewson <nickm@torproject.org>
Mon, 28 Mar 2016 11:40:20 +0000 (07:40 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 28 Mar 2016 11:40:20 +0000 (07:40 -0400)
src/or/rephist.c

index 8654cd3085c6b6ff84299908f31e51a6a7fd1b90..fe0ca91c25e177c5d778a1ebf512eb1e8a900f1a 100644 (file)
@@ -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);