All of lore.kernel.org
 help / color / mirror / Atom feed
* [iptables PATCH 1/2] iptables-restore: Drop dead code
@ 2023-08-01 15:15 Phil Sutter
  2023-08-01 15:15 ` [iptables PATCH 2/2] iptables-apply: Eliminate shellcheck warnings Phil Sutter
  2023-08-03 14:18 ` [iptables PATCH 1/2] iptables-restore: Drop dead code Phil Sutter
  0 siblings, 2 replies; 3+ messages in thread
From: Phil Sutter @ 2023-08-01 15:15 UTC (permalink / raw)
  To: netfilter-devel

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 | 2 --
 1 file changed, 2 deletions(-)

diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index f11b2dc2fd316..530297383d50b 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -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) {
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-03 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 15:15 [iptables PATCH 1/2] iptables-restore: Drop dead code Phil Sutter
2023-08-01 15:15 ` [iptables PATCH 2/2] iptables-apply: Eliminate shellcheck warnings Phil Sutter
2023-08-03 14:18 ` [iptables PATCH 1/2] iptables-restore: Drop dead code Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.