From: "Kristofer Karlsson via GitGitGadget" <gitgitgadget@gmail•com>
To: git@vger•kernel.org
Cc: Kristofer Karlsson <krka@spotify•com>,
Kristofer Karlsson <krka@spotify•com>
Subject: [PATCH 1/3] pack-objects: call release_revisions() after cruft traversal
Date: Wed, 27 May 2026 15:50:00 +0000 [thread overview]
Message-ID: <743adab469c748aed66555e5390379b54154216d.1779897003.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2127.git.1779897003.gitgitgadget@gmail.com>
From: Kristofer Karlsson <krka@spotify•com>
enumerate_and_traverse_cruft_objects() initializes a rev_info on the
stack but never calls release_revisions() afterwards. This is not
visible on master but becomes a leak once the revision walking
machinery uses dynamically allocated structures.
Add the missing release_revisions() call.
Signed-off-by: Kristofer Karlsson <krka@spotify•com>
---
builtin/pack-objects.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 480cc0bd8c..67025e8625 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -4275,6 +4275,7 @@ static void enumerate_and_traverse_cruft_objects(struct string_list *fresh_packs
traverse_commit_list(&revs, show_cruft_commit, show_cruft_object, NULL);
stop_progress(&progress_state);
+ release_revisions(&revs);
}
static void read_cruft_objects(void)
--
gitgitgadget
next prev parent reply other threads:[~2026-05-27 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 15:49 [PATCH 0/3] revision: use priority queue for streaming walks Kristofer Karlsson via GitGitGadget
2026-05-27 15:50 ` Kristofer Karlsson via GitGitGadget [this message]
2026-05-27 15:50 ` [PATCH 2/3] revision: introduce rev_walk_mode to clarify get_revision_1() Kristofer Karlsson via GitGitGadget
2026-05-27 15:50 ` [PATCH 3/3] revision: use priority queue for non-limited streaming walks Kristofer Karlsson via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=743adab469c748aed66555e5390379b54154216d.1779897003.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=krka@spotify$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox