summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-04-10 08:58:27 +0200
committerJunio C Hamano <gitster@pobox.com>2010-04-10 09:43:59 +0200
commitf5b26b1d14d3362fa41e51f4f78cdf56968733ba (patch)
tree1ebd38badb1d15a9075df6ee5905faa31e013636
parentwt-status: remove unused workdir_untracked member (diff)
downloadgit-f5b26b1d14d3362fa41e51f4f78cdf56968733ba.tar.xz
git-f5b26b1d14d3362fa41e51f4f78cdf56968733ba.zip
wt-status: plug memory leak while collecting untracked files
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--wt-status.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index db20b86102..c88159ad06 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)