Skip to content

Commit

Permalink
wt-status: plug memory leak while collecting untracked files
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Apr 10, 2010
1 parent e28a243 commit f5b26b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f5b26b1

Please sign in to comment.