diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-08-15 21:02:01 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-08-16 00:46:44 +0200 |
commit | b2dcff5766cdf33799659e667a06e109d17b6eb9 (patch) | |
tree | 89b41ec263df8ab2422225ea9edd3563fbf5f828 /src | |
parent | 527581194c285e5b08d4bb4fd9c573a0f12dd83b (diff) | |
download | tor-b2dcff5766cdf33799659e667a06e109d17b6eb9.tar tor-b2dcff5766cdf33799659e667a06e109d17b6eb9.tar.gz |
Fix a memory leak in dirvote_compute_consensuses()
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirvote.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 0042934c4..925f57f6e 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -2942,6 +2942,7 @@ dirvote_compute_consensuses(void) strlen(pending_consensus_signatures), 0); log_notice(LD_DIR, "Signature(s) posted."); + smartlist_free(votes); return 0; err: smartlist_free(votes); @@ -3138,7 +3139,7 @@ void dirvote_free_all(void) { dirvote_clear_votes(1); - /* now empty as a result of clear_pending_votes. */ + /* now empty as a result of dirvote_clear_votes(). */ smartlist_free(pending_vote_list); pending_vote_list = NULL; smartlist_free(previous_vote_list); @@ -3147,7 +3148,7 @@ dirvote_free_all(void) dirvote_clear_pending_consensuses(); tor_free(pending_consensus_signatures); if (pending_consensus_signature_list) { - /* now empty as a result of clear_pending_votes. */ + /* now empty as a result of dirvote_clear_votes(). */ smartlist_free(pending_consensus_signature_list); pending_consensus_signature_list = NULL; } |