]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-restore: Drop dead code
authorPhil Sutter <phil@nwl.cc>
Thu, 13 Jul 2023 16:32:02 +0000 (18:32 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 1 Aug 2023 15:16:37 +0000 (17:16 +0200)
Handle initialization is guarded by 'in_table' boolean, so there can't
be a handle already (because the branch which unsets 'in_table' also
frees the handle).

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/iptables-restore.c

index f11b2dc2fd316ea5180c46b06c31b1ceb82400a8..530297383d50b50aaa562249dce7c5e9e8be8eec 100644 (file)
@@ -223,8 +223,6 @@ ip46tables_restore_main(const struct iptables_restore_cb *cb,
                                }
                                continue;
                        }
-                       if (handle)
-                               cb->ops->free(handle);
 
                        handle = create_handle(cb, table);
                        if (noflush == 0) {