Hi,

In DBD/File.pm which ships as part of DBD::CSV there is an opendir
without a closedir, which results in a file descriptor leak.

The following patch fixes this, which is vital if DBD::CSV is to be
used in a daemon or other long running process.

Regards,
Alex Hornby

--- File.pm.orig        Fri May  4 12:04:16 2001
+++ File.pm     Fri May  4 12:12:56 2001
@@ -270,6 +270,10 @@
                push(@tables, [undef, $user, $file, "TABLE", undef]);
            }
        }
+       if(!closedir($dirh)) {
+           DBI::set_err($dbh, 1, "Cannot close directory $dir");
+           return undef;
+       }
 
        my $dbh2 = $dbh->{'csv_sponge_driver'};
        if (!$dbh2) {

Reply via email to