]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory leak in dirvote_compute_consensuses()
authorSebastian Hahn <sebastian@torproject.org>
Sun, 15 Aug 2010 19:02:01 +0000 (21:02 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Sun, 15 Aug 2010 22:46:44 +0000 (00:46 +0200)
changes/bug1831
src/or/dirvote.c

index 6c504dadbcfc0ded132e45a3fa4f5d3cbda9cd3e..72f7d218566e7394d1840089446a94c7f2f01afc 100644 (file)
@@ -3,3 +3,6 @@
       Bugfix on 0.2.2.14-alpha; fixes bug 1831 partially.
     - Fix a memory leak in dirvote_add_signatures_to_pending_consensus(). 
       Bugfix on 0.2.2.6-alpha; fixes bug 1831 partially.
+    - Fix a memory leak in dirvote_compute_consensuses().
+      Bugfix on 0.2.0.3-alpha; fixes bug 1831 partially.
+
index 0042934c4ad63650c6ae2346b525d8a68dbfedbc..925f57f6e877f34033aa1e0f16bb8427df55c531 100644 (file)
@@ -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;
   }