mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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:
commit
37317ab40b
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue