Merge branch 'ad/preload-plug-memleak' into maint

The preload-index codepath made copies of pathspec to give to
multiple threads, which were left leaked.

* ad/preload-plug-memleak:
  preload-index: fix memleak
This commit is contained in:
Junio C Hamano 2022-09-13 12:21:10 -07:00
commit 37317ab40b

View File

@ -151,6 +151,12 @@ void preload_index(struct index_state *index,
}
stop_progress(&pd.progress);
if (pathspec) {
/* earlier we made deep copies for each thread to work with */
for (i = 0; i < threads; i++)
clear_pathspec(&data[i].pathspec);
}
trace_performance_leave("preload index");
trace2_data_intmax("index", NULL, "preload/sum_lstat", t2_sum_lstat);