Avoid a fatal Perl error in Config::cleanup when an fatal error occurs

while compiling a default action.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-01-11 15:50:23 -08:00
parent 38097bef5d
commit b53fd39b49
2 changed files with 3 additions and 3 deletions

View File

@ -1128,8 +1128,8 @@ sub cleanup() {
for ( my $i = @openstack - 1; $i >= 0; $i-- ) { for ( my $i = @openstack - 1; $i >= 0; $i-- ) {
my $istack = $openstack[$i]; my $istack = $openstack[$i];
for ( my $j = ( @$istack - 1 ); $j >= 0; $j-- ) { for ( my $j = ( @$istack - 1 ); $j >= 0; $j-- ) {
my $info = $istack->[$j]; my $info = $istack->[$j][0];
close $info->[0]; close $info if $info;
} }
} }
} }

View File

@ -1324,4 +1324,4 @@ clear_firewall() {
logger -p kern.info "$g_product Cleared" logger -p kern.info "$g_product Cleared"
} }
?endif ?endif # IPv6-specific functions.