aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2008-10-31 18:57:10 +0000
committerJunio C Hamano <gitster@pobox.com>2008-11-01 23:48:45 -0700
commit8c178687959732edab8bf91da9ed9f4fbcf7c14e (patch)
tree99b152ee9a9ebd19a47b0304c9fd5f6d22388e6f /git-send-email.perl
parent30affa1e9a15e848f77c9c14544dd6dd593559d5 (diff)
downloadgit-8c178687959732edab8bf91da9ed9f4fbcf7c14e.tar.gz
git-8c178687959732edab8bf91da9ed9f4fbcf7c14e.tar.xz
git send-email: avoid leaking directory file descriptors.
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl3
1 files changed, 1 insertions, 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";
}