[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix a memory leak in consdiffmgr.c



commit 3af4aafbcb035271f84480ef745bad2b8c28a92b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Aug 8 09:12:09 2017 -0400

    Fix a memory leak in consdiffmgr.c
    
    Fixes bug 23139; bugfix on 0.3.1.1-alpha.
---
 changes/bug23139     | 3 +++
 src/or/consdiffmgr.c | 1 +
 2 files changed, 4 insertions(+)

diff --git a/changes/bug23139 b/changes/bug23139
new file mode 100644
index 000000000..ed63ce85e
--- /dev/null
+++ b/changes/bug23139
@@ -0,0 +1,3 @@
+  o Minor bugfixes (directory cache):
+    - Fix a memory leak in the code that recovers space in the consensus
+      directory cache. Fixes bug 23139; bugfix on 0.3.1.1-alpha.
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index 67a5d0b3c..928fc26f5 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -1156,6 +1156,7 @@ consdiffmgr_ensure_space_for_files(int n)
     if (++n_marked >= n_to_remove)
       break;
   } SMARTLIST_FOREACH_END(ent);
+  smartlist_free(objects);
 
   consensus_cache_delete_pending(cache, 1);
   if (BUG(n_marked < n_to_remove))



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits