diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-10-13 23:18:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-10-13 23:18:28 +0200 |
commit | 2920971a7fd345eeaa72feae554030850e06aeec (patch) | |
tree | ea429ebcbf796b66ef0524a8723db66be7ca772c /revision.c | |
parent | Merge branch 'ar/diff-index-merge-base-fix' (diff) | |
parent | daemon: free listen_addr before returning (diff) | |
download | git-2920971a7fd345eeaa72feae554030850e06aeec.tar.xz git-2920971a7fd345eeaa72feae554030850e06aeec.zip |
Merge branch 'jk/decoration-and-other-leak-fixes'
Leakfix.
* jk/decoration-and-other-leak-fixes:
daemon: free listen_addr before returning
revision: clear decoration structs during release_revisions()
decorate: add clear_decoration() function
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/revision.c b/revision.c index e789834dd1..219dc76716 100644 --- a/revision.c +++ b/revision.c @@ -3083,6 +3083,11 @@ static void release_revisions_mailmap(struct string_list *mailmap) static void release_revisions_topo_walk_info(struct topo_walk_info *info); +static void free_void_commit_list(void *list) +{ + free_commit_list(list); +} + void release_revisions(struct rev_info *revs) { free_commit_list(revs->commits); @@ -3100,6 +3105,10 @@ void release_revisions(struct rev_info *revs) diff_free(&revs->pruning); reflog_walk_info_release(revs->reflog_info); release_revisions_topo_walk_info(revs->topo_walk_info); + clear_decoration(&revs->children, free_void_commit_list); + clear_decoration(&revs->merge_simplification, free); + clear_decoration(&revs->treesame, free); + line_log_free(revs); } static void add_child(struct rev_info *revs, struct commit *parent, struct commit *child) |