--- a/lib/Nagios/Check/DNS/check_tlsa_record.pm Tue Jun 21 16:14:56 2016 +0200
+++ b/lib/Nagios/Check/DNS/check_tlsa_record.pm Tue Jun 21 16:18:10 2016 +0200
@@ -17,6 +17,8 @@
my $dane_pattern = qr'^(?<record>(?<tlsa_usage>\d+)\s+(?<tlsa_selector>\d+)\s+(?<tlsa_match_type>\d+)\s+(?<tlsa_hash>[0-9a-f ]+))$';
my $with_cname = qr'^(?<cname>[_a-z]+.*\n).*';
+# keep in in 'our' to avoid garbage collection and destruction
+# of the File::Temp object
our $tmpfile = File::Temp->new();
my $fdname = '/dev/fd/' . fileno $tmpfile;
fcntl($tmpfile, F_SETFD, fcntl($tmpfile, F_GETFD, 0) & ~FD_CLOEXEC)