Thread (26 messages) flat view 26 messages, 7 authors, 2016-06-15
STALE3730d

[PATCH 2/5] wt-status: plug memory leak while collecting untracked files

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:35
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Junio C Hamano <redacted>
---
 wt-status.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index db20b86..c88159a 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)
-- 
1.7.1.rc0.264.g94f6e
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help