"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > --- a/unpack-trees.c > +++ b/unpack-trees.c > @@ -1544,8 +1544,8 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options > o->merge_size = len; > mark_all_ce_unused(o->src_index); > > - if (o->src_index->fsmonitor_last_update) > - o->result.fsmonitor_last_update = o->src_index->fsmonitor_last_update; > + o->result.fsmonitor_last_update = > + xstrdup_or_null(o->src_index->fsmonitor_last_update); And this won't happen twice, so there is no need to free what is in the o->result side before assignment. And 2/2 frees it so we do not leak at the end either. Will queue; thanks. > > /* > * Sparse checkout loop #1: set NEW_SKIP_WORKTREE on existing entries