diff options
author | David Goulet <dgoulet@torproject.org> | 2018-04-25 10:49:32 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-05-01 10:06:13 -0400 |
commit | 6ee6533fd89018036f11c5ee62897f8a2b6c39c0 (patch) | |
tree | f0f14ed5a9128733d2a6425b9fa00f71d11a545e /src/or/networkstatus.c | |
parent | 2963e65c30d1c1463e71385439246e0df1e363c5 (diff) | |
download | tor-6ee6533fd89018036f11c5ee62897f8a2b6c39c0.tar.gz tor-6ee6533fd89018036f11c5ee62897f8a2b6c39c0.zip |
dirvote: Free vote commits in the dirauth module
In order to make sr_commit_free() only used by the dirauth module, this
commits moves the commits free from a vote object into the dirvote.c file
which is now only for the module.
The function does nothing if the module is disabled.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r-- | src/or/networkstatus.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index fa8d0bcf13..5ca320d284 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -366,9 +366,7 @@ networkstatus_vote_free_(networkstatus_t *ns) digestmap_free(ns->desc_digest_map, NULL); if (ns->sr_info.commits) { - SMARTLIST_FOREACH(ns->sr_info.commits, sr_commit_t *, c, - sr_commit_free(c)); - smartlist_free(ns->sr_info.commits); + dirvote_clear_commits(ns); } tor_free(ns->sr_info.previous_srv); tor_free(ns->sr_info.current_srv); |