tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit c389c4129252b49f7e5bd77e1be342cddbe388fb
parent 46dca273214147233808bcddb82c8bf76e8d6db5
Author: Nick Mathewson <nickm@torproject.org>
Date:   Thu, 21 Jun 2018 08:36:48 -0400

Merge branch 'maint-0.3.3' into maint-0.3.4

Diffstat:
Achanges/bug26435 | 5+++++
Msrc/or/protover.c | 9++++++---
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/changes/bug26435 b/changes/bug26435 @@ -0,0 +1,5 @@ + o Major bugfixes: + - Fix a memory leak where directory authorities would leak a chunk + of memory for every router descriptor every time they considered + voting. This bug was taking down directory authorities due to + out-of-memory issues. Fixes bug 26435; bugfix on 0.3.3.6. diff --git a/src/or/protover.c b/src/or/protover.c @@ -283,9 +283,12 @@ parse_protocol_list(const char *s) bool protover_contains_long_protocol_names(const char *s) { - if (!parse_protocol_list(s)) - return true; - return false; + smartlist_t *list = parse_protocol_list(s); + if (!list) + return true; /* yes, has a dangerous name */ + SMARTLIST_FOREACH(list, proto_entry_t *, ent, proto_entry_free(ent)); + smartlist_free(list); + return false; /* no, looks fine */ } /**