plug a DIR buffer leak in rerere.c

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jim Meyering 2011-05-26 15:55:50 +02:00 committed by Junio C Hamano
parent 665b051b90
commit a9930e359c

View File

@ -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);