Skip to content

Commit 85e6165

Browse files
committed
pack-objects: release rev_info as appropriate
These seem to cause leaks with the prio_queue, but really, I'm surprised it wasn't doing so before (I guess because we consumed everything in the revs->commits list?). But this should probably be a preparatory patch.
1 parent f77983f commit 85e6165

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/pack-objects.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3954,6 +3954,7 @@ static void read_stdin_packs(enum stdin_packs_mode mode, int rev_list_unpacked)
39543954
stdin_packs_found_nr);
39553955
trace2_data_intmax("pack-objects", the_repository, "stdin_packs_hints",
39563956
stdin_packs_hints_nr);
3957+
release_revisions(&revs);
39573958
}
39583959

39593960
static void add_cruft_object_entry(const struct object_id *oid, enum object_type type,
@@ -4117,6 +4118,7 @@ static void enumerate_and_traverse_cruft_objects(struct string_list *fresh_packs
41174118
traverse_commit_list(&revs, show_cruft_commit, show_cruft_object, NULL);
41184119

41194120
stop_progress(&progress_state);
4121+
release_revisions(&revs);
41204122
}
41214123

41224124
static void read_cruft_objects(void)

0 commit comments

Comments
 (0)