[iptables PATCH 1/2] iptables-restore: Drop dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux