From: Jim Meyering Date: Thu, 26 May 2011 13:55:50 +0000 (+0200) Subject: plug a DIR buffer leak in rerere.c X-Git-Tag: v1.7.6-rc0~21 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a9930e359c45302f92639e8cd0a61c9c912e0b22;p=git.git plug a DIR buffer leak in rerere.c Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano --- diff --git a/rerere.c b/rerere.c index dee2cb151..e3407cf33 100644 --- a/rerere.c +++ b/rerere.c @@ -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);