summaryrefslogtreecommitdiff
path: root/commit-reach.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-08-01 12:41:15 +0200
committerJunio C Hamano <gitster@pobox.com>2024-08-01 08:47:38 -0700
commitf30bfafcd41d0f13575361957dc361aa2be4d4c5 (patch)
tree4081e9ce08ca87d8fb4f58cfe15ce00ac8548274 /commit-reach.c
parent9642479a2b62f7a3f3bf6086c02157c745bb5d74 (diff)
commit-reach: fix trivial memory leak when computing reachability
We don't free the local `stack` commit list that we use to compute reachability of multiple commits at once. Do so. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-reach.c')
-rw-r--r--commit-reach.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/commit-reach.c b/commit-reach.c
index dabc2972e4..02f8218b8e 100644
--- a/commit-reach.c
+++ b/commit-reach.c
@@ -1227,4 +1227,5 @@ void tips_reachable_from_bases(struct repository *r,
done:
free(commits);
repo_clear_commit_marks(r, SEEN);
+ free_commit_list(stack);
}