Skip to content

Commit 21ce0b4

Browse files
committed
Merge branch 'mh/release-commit-memory-fix'
Leakfix. * mh/release-commit-memory-fix: commit: free the right buffer in release_commit_memory
2 parents f0fcab6 + 9784f97 commit 21ce0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ struct object_id *get_commit_tree_oid(const struct commit *commit)
364364
void release_commit_memory(struct parsed_object_pool *pool, struct commit *c)
365365
{
366366
set_commit_tree(c, NULL);
367-
c->index = 0;
368367
free_commit_buffer(pool, c);
368+
c->index = 0;
369369
free_commit_list(c->parents);
370370

371371
c->object.parsed = 0;

0 commit comments

Comments
 (0)