Skip to content

Commit

Permalink
plug a DIR buffer leak in rerere.c
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Meyering <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
meyering authored and gitster committed May 26, 2011
1 parent 665b051 commit a9930e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rerere.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ void rerere_gc(struct string_list *rr)
if (then < now - cutoff * 86400)
string_list_append(&to_remove, e->d_name);
}
closedir(dir);
for (i = 0; i < to_remove.nr; i++)
unlink_rr_item(to_remove.items[i].string);
string_list_clear(&to_remove, 0);
Expand Down

0 comments on commit a9930e3

Please sign in to comment.