Subject: [PATCH 1/3] git send-email: avoid leaking directory file descriptors.

From: Pierre Habouzit <[email-masked]>
Date: Fri, 31 Oct 2008 11:57:10 +0100

Signed-off-by: Pierre Habouzit <[email-masked]>
---
 git-send-email.perl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index bdbfac6..94ca5c8 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -374,10 +374,9 @@ for my $f (@ARGV) {
 
 		push @files, grep { -f $_ } map { +$f . "/" . $_ }
 				sort readdir(DH);
-
+		closedir(DH);
 	} elsif (-f $f or -p $f) {
 		push @files, $f;
-
 	} else {
 		print STDERR "Skipping $f - not found.\n";
 	}
-- 
1.6.0.3.759.g40a2.dirty