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>maint
parent
665b051b90
commit
a9930e359c
1
rerere.c
1
rerere.c
|
@ -739,6 +739,7 @@ void rerere_gc(struct string_list *rr)
|
||||||
if (then < now - cutoff * 86400)
|
if (then < now - cutoff * 86400)
|
||||||
string_list_append(&to_remove, e->d_name);
|
string_list_append(&to_remove, e->d_name);
|
||||||
}
|
}
|
||||||
|
closedir(dir);
|
||||||
for (i = 0; i < to_remove.nr; i++)
|
for (i = 0; i < to_remove.nr; i++)
|
||||||
unlink_rr_item(to_remove.items[i].string);
|
unlink_rr_item(to_remove.items[i].string);
|
||||||
string_list_clear(&to_remove, 0);
|
string_list_clear(&to_remove, 0);
|
||||||
|
|
Loading…
Reference in New Issue