Skip to content

Commit f5b26b1

Browse files
committed
wt-status: plug memory leak while collecting untracked files
Signed-off-by: Junio C Hamano <[email protected]>
1 parent e28a243 commit f5b26b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wt-status.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,10 @@ static void wt_status_collect_untracked(struct wt_status *s)
379379
if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL))
380380
continue;
381381
string_list_insert(ent->name, &s->untracked);
382+
free(ent);
382383
}
384+
385+
free(dir.entries);
383386
}
384387

385388
void wt_status_collect(struct wt_status *s)

0 commit comments

Comments
 (0)