summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-08 19:29:10 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-08 19:29:10 -0400
commit47e7a167d23c6ba1492a4006f6275e34c6a57b14 (patch)
tree36cdff75702638b0e4e3dbd09b0b9cb0b3ece8d1
parentcbcff6759d98928d9d252aaf6268f2f679f8b00e (diff)
parenta47b8fcf9295111339b80e5bc81c3de428241cad (diff)
downloadtor-47e7a167d23c6ba1492a4006f6275e34c6a57b14.tar.gz
tor-47e7a167d23c6ba1492a4006f6275e34c6a57b14.zip
Merge branch 'maint-0.3.1' into release-0.3.1
-rw-r--r--changes/bug231393
-rw-r--r--src/or/consdiffmgr.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/changes/bug23139 b/changes/bug23139
new file mode 100644
index 0000000000..ed63ce85e2
--- /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 67a5d0b3c5..928fc26f54 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))