From: Pierre Habouzit Date: Fri, 31 Oct 2008 18:57:10 +0000 (+0000) Subject: git send-email: avoid leaking directory file descriptors. X-Git-Tag: v1.6.0.4~17 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8c178687959732edab8bf91da9ed9f4fbcf7c14e;p=git.git git send-email: avoid leaking directory file descriptors. Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- 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"; }