wt-status: plug memory leak while collecting untracked files
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e28a243b00
commit
f5b26b1d14
@ -379,7 +379,10 @@ static void wt_status_collect_untracked(struct wt_status *s)
|
|||||||
if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
|
if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
|
||||||
continue;
|
continue;
|
||||||
string_list_insert(ent->name, &s->untracked);
|
string_list_insert(ent->name, &s->untracked);
|
||||||
|
free(ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(dir.entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wt_status_collect(struct wt_status *s)
|
void wt_status_collect(struct wt_status *s)
|
||||||
|
Loading…
Reference in New Issue
Block a user