diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-09-23 15:41:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-09-23 15:41:27 -0400 |
commit | 228ac47c2cc2625e08c689af6a7cdae592923acb (patch) | |
tree | 09a0121b1714c68104d20135985fbe388c7618ea /src | |
parent | 2b39543dfce77364e1bde3cee06dc09904609566 (diff) | |
download | tor-228ac47c2cc2625e08c689af6a7cdae592923acb.tar.gz tor-228ac47c2cc2625e08c689af6a7cdae592923acb.zip |
Fix memory leak in vote generation
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/dirauth/dirvote.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index 1715898382..f56d3ef0a0 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -4566,7 +4566,6 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, time_t cutoff = now - ROUTER_MAX_AGE_TO_PUBLISH; networkstatus_voter_info_t *voter = NULL; vote_timing_t timing; - digestmap_t *omit_as_sybil = digestmap_new(); const int vote_on_reachability = running_long_enough_to_decide_unreachable(); smartlist_t *microdescriptors = NULL; smartlist_t *bw_file_headers = NULL; @@ -4637,7 +4636,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, /* After this point, don't use rl->routers; use 'routers' instead. */ routers_sort_by_identity(routers); /* Get a digestmap of possible sybil routers, IPv4 or IPv6 */ - omit_as_sybil = get_all_possible_sybil(routers); + digestmap_t *omit_as_sybil = get_all_possible_sybil(routers); DIGESTMAP_FOREACH (omit_as_sybil, sybil_id, void *, ignore) { (void)ignore; rep_hist_make_router_pessimal(sybil_id, now); |