summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/revwalk.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/revwalk.c b/src/revwalk.c
index 5d7f65df6..c3b53a351 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -45,9 +45,18 @@ git_revpool *gitrp_alloc(git_odb *db)
void gitrp_free(git_revpool *walk)
{
+ git_commit *commit;
+ git_revpool_tableit it;
+
git_commit_list_clear(&(walk->iterator), 0);
git_commit_list_clear(&(walk->roots), 0);
+ git_revpool_tableit_init(walk->commits, &it);
+
+ while ((commit = (git_commit *)git_revpool_tableit_next(&it)) != NULL) {
+ free(commit);
+ }
+
git_revpool_table_free(walk->commits);
free(walk);