Call delete_chain_and_references recursively.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-05-12 09:29:29 -07:00
parent 4b76d8c462
commit 6551d67b2e

View File

@ -1640,7 +1640,7 @@ sub decrement_reference_count( $$ ) {
if ( $toref && $toref->{referenced} ) {
assert($toref->{references}{$chain} > 0 , $toref, $chain );
delete $toref->{references}{$chain} unless --$toref->{references}{$chain};
delete_chain( $toref ) unless ( keys %{$toref->{references}} );
delete_chain_and_references ( $toref ) unless ( keys %{$toref->{references}} );
}
}