@matheusbsbs / matheus-bagliano / commits / 8c17868795
Fork 0

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>

Pierre Habouzit committed Oct 31, 2008 at 18:57 UTC 8c178687959732edab8bf91da9ed9f4fbcf7c14e
1 file changed +1 -2
git-send-email.perl
+1 -2
@@ -407,10 +407,9 @@ for my $f (@ARGV) {
407
408 push @files, grep { -f $_ } map { +$f . "/" . $_ }
409 sort readdir(DH);
410 -
410 + closedir(DH);
411 } elsif (-f $f or -p $f) {
412 push @files, $f;
413 -
413 } else {
414 print STDERR "Skipping $f - not found.\n";
415 }