]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-objects: call release_revisions() after cruft traversal
authorKristofer Karlsson <krka@spotify.com>
Wed, 27 May 2026 15:50:00 +0000 (15:50 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2026 21:08:19 +0000 (06:08 +0900)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c

index 480cc0bd8c8d227caa875e9a2293c9df73f6f547..67025e86256cfde1772f6e60616dde3ab0e8e3fc 100644 (file)
@@ -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)