Fix a memory leak in consdiffmgr.c

Fixes bug 23139; bugfix on 0.3.1.1-alpha.
This commit is contained in:
Nick Mathewson
2017-08-08 09:12:09 -04:00
parent 1168e21b45
commit 3af4aafbcb
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -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.
+1
View File
@@ -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))