forked from extern/shorewall_code
Correct an optimization bug involving empty/unreferenced chains
This commit is contained in:
parent
98ad7e15b0
commit
d68d40ee1c
@ -1153,6 +1153,13 @@ sub delete_jumps ( $$ ) {
|
||||
my $from = $fromref->{name};
|
||||
my $rules = $fromref->{rules};
|
||||
my $refs = $toref->{references}{$from};
|
||||
|
||||
#
|
||||
# The 'from' chain may have had no references and has already been deleted so
|
||||
# we need to check
|
||||
#
|
||||
if ( $fromref->{referenced} ) {
|
||||
#
|
||||
#
|
||||
# A C-style for-loop with indexing seems to work best here, given that we are
|
||||
# deleting elements from the array over which we are iterating.
|
||||
@ -1167,6 +1174,7 @@ sub delete_jumps ( $$ ) {
|
||||
}
|
||||
|
||||
assert( ! $refs );
|
||||
}
|
||||
|
||||
delete $toref->{references}{$from};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user