[SCM] Debian package checker branch, master, updated. 2.5.3-211-g4f22668
The following commit has been merged in the master branch:
commit 636362fe2eb4c29aea6c38ca918aa79b12fbe8e2
Author: Niels Thykier <niels@thykier.net>
Date: Wed Nov 9 08:36:32 2011 +0100
Fixed a file descriptor leak in Lintian::Data
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/debian/changelog b/debian/changelog
index 95f0dbd..f481299 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -137,6 +137,8 @@ lintian (2.5.4) UNRELEASED; urgency=low
+ [NT] Removed, replaced by Lintian::Package{,::Entry}.
* lib/Lintian/Check.pm:
+ [JW] Merged with common_data.pm.
+ * lib/Lintian/Data.pm:
+ + [NT] Fixed a file descriptor leak.
* lib/Lintian/Collect/Source.pm:
+ [JW] Fixed call to binary_field in binary_relation.
(Closes: #641609)
diff --git a/lib/Lintian/Data.pm b/lib/Lintian/Data.pm
index 842c5cd..bfad3fd 100644
--- a/lib/Lintian/Data.pm
+++ b/lib/Lintian/Data.pm
@@ -34,10 +34,10 @@ use Carp qw(croak);
croak('no data type specified') unless $type;
unless (exists $data{$type}) {
my $dir = $ENV{LINTIAN_ROOT} . '/data';
- open(LIST, '<', "$dir/$type")
+ open(my $fd, '<', "$dir/$type")
or croak("unknown data type $type");
local ($_, $.);
- while (<LIST>) {
+ while (<$fd>) {
chomp;
s/^\s+//;
next if /^\#/;
@@ -51,6 +51,7 @@ use Carp qw(croak);
}
$data{$type}{$key} = $val;
}
+ close $fd;
}
my $self = { data => $data{$type} };
bless($self, $class);
--
Debian package checker
Reply to: