From b53fd39b497fd67ebfb718552d90c760ed1972b6 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 11 Jan 2013 15:50:23 -0800 Subject: [PATCH] Avoid a fatal Perl error in Config::cleanup when an fatal error occurs while compiling a default action. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 4 ++-- Shorewall/Perl/lib.core | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 2f4095028..d01eaba90 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1128,8 +1128,8 @@ sub cleanup() { for ( my $i = @openstack - 1; $i >= 0; $i-- ) { my $istack = $openstack[$i]; for ( my $j = ( @$istack - 1 ); $j >= 0; $j-- ) { - my $info = $istack->[$j]; - close $info->[0]; + my $info = $istack->[$j][0]; + close $info if $info; } } } diff --git a/Shorewall/Perl/lib.core b/Shorewall/Perl/lib.core index 923806a87..f92172cce 100644 --- a/Shorewall/Perl/lib.core +++ b/Shorewall/Perl/lib.core @@ -1324,4 +1324,4 @@ clear_firewall() { logger -p kern.info "$g_product Cleared" } -?endif +?endif # IPv6-specific functions.