Browse Source

Merge branch 'ad/preload-plug-memleak'

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
maint
Junio C Hamano 3 years ago
parent
commit
f0deb3f2b5
  1. 6
      preload-index.c

6
preload-index.c

@ -151,6 +151,12 @@ void preload_index(struct index_state *index,
} }
stop_progress(&pd.progress); 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"); trace_performance_leave("preload index");


trace2_data_intmax("index", NULL, "preload/sum_lstat", t2_sum_lstat); trace2_data_intmax("index", NULL, "preload/sum_lstat", t2_sum_lstat);

Loading…
Cancel
Save