Code

git send-email: avoid leaking directory file descriptors.
authorPierre Habouzit <madcoder@debian.org>
Fri, 31 Oct 2008 18:57:10 +0000 (18:57 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Nov 2008 06:48:45 +0000 (23:48 -0700)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl

index d2fd89907688a044ffe0d2520744e00a9b33c942..18529c76e665e613d9c116e32da6acf31b3eac6a 100755 (executable)
@@ -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";
        }