diff --git a/changes/bug26435 b/changes/bug26435 new file mode 100644 index 0000000000000000000000000000000000000000..c2819493497c143da27a96336d5f7a612bc25650 --- /dev/null +++ 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 index e4efe0a70b248355dc1ef6b6b1b99bd9b978d1e2..0e8902196d281da73506a0d58c592084c9923823 100644 --- 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 */ } /**