about summary refs log tree commit diff
path: root/third_party/cgit/ui-stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/cgit/ui-stats.c')
-rw-r--r--third_party/cgit/ui-stats.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/third_party/cgit/ui-stats.c b/third_party/cgit/ui-stats.c
index 09b3625e7e..40ed6c21df 100644
--- a/third_party/cgit/ui-stats.c
+++ b/third_party/cgit/ui-stats.c
@@ -241,8 +241,7 @@ static struct string_list collect_stats(const struct cgit_period *period)
 	memset(&authors, 0, sizeof(authors));
 	while ((commit = get_revision(&rev)) != NULL) {
 		add_commit(&authors, commit, period);
-		free_commit_buffer(the_repository->parsed_objects, commit);
-		free_commit_list(commit->parents);
+		release_commit_memory(the_repository->parsed_objects, commit);
 		commit->parents = NULL;
 	}
 	return authors;