summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-09-30 04:19:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-09-30 04:19:25 (GMT)
commit21ce0b48f31a89001d903e379cd6abb8f31a525d (patch)
treef6cc45566538b4798da8e6984b19e9f725003d52 /commit.c
parentf0fcab6deb0bdd005d4725b4377ea1471e2f07a0 (diff)
parent9784f9732165bf01c039d7fae2f0fba9bd06a015 (diff)
downloadgit-21ce0b48f31a89001d903e379cd6abb8f31a525d.zip
git-21ce0b48f31a89001d903e379cd6abb8f31a525d.tar.gz
git-21ce0b48f31a89001d903e379cd6abb8f31a525d.tar.bz2
Merge branch 'mh/release-commit-memory-fix'
Leakfix. * mh/release-commit-memory-fix: commit: free the right buffer in release_commit_memory
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commit.c b/commit.c
index a98de16..3fe5f8f 100644
--- a/commit.c
+++ b/commit.c
@@ -364,8 +364,8 @@ struct object_id *get_commit_tree_oid(const struct commit *commit)
void release_commit_memory(struct parsed_object_pool *pool, struct commit *c)
{
set_commit_tree(c, NULL);
- c->index = 0;
free_commit_buffer(pool, c);
+ c->index = 0;
free_commit_list(c->parents);
c->object.parsed = 0;