diff options
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r-- | iptables/nft-shared.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index 2d4b8d55..a72d414d 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -687,6 +687,11 @@ void nft_clear_iptables_command_state(struct iptables_command_state *cs) if (cs->target) { free(cs->target->t); cs->target->t = NULL; + + if (cs->target == cs->target->next) { + free(cs->target); + cs->target = NULL; + } } } |