From 8c178687959732edab8bf91da9ed9f4fbcf7c14e Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Fri, 31 Oct 2008 18:57:10 +0000 Subject: [PATCH] git send-email: avoid leaking directory file descriptors. Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- git-send-email.perl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index d2fd89907..18529c76e 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -407,10 +407,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"; } -- 2.30.2