From: Junio C Hamano Date: Sat, 10 Apr 2010 06:58:27 +0000 (-0700) Subject: wt-status: plug memory leak while collecting untracked files X-Git-Tag: v1.7.2-rc0~126^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f5b26b1d14d3362fa41e51f4f78cdf56968733ba;p=git.git wt-status: plug memory leak while collecting untracked files Signed-off-by: Junio C Hamano --- diff --git a/wt-status.c b/wt-status.c index db20b8610..c88159ad0 100644 --- a/wt-status.c +++ b/wt-status.c @@ -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)) continue; string_list_insert(ent->name, &s->untracked); + free(ent); } + + free(dir.entries); } void wt_status_collect(struct wt_status *s)