From: Daniel Wagner <[email protected]>

We reach there only when is_user_defined is true which is only
set if the chain pointer is not NULL.

Reported by coverity.
---
 src/iptables.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/iptables.c b/src/iptables.c
index 80620a1..49a276d 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -1595,11 +1595,6 @@ static struct xtables_target *prepare_target(struct 
connman_iptables *table,
                else if (is_user_defined) {
                        struct connman_iptables_entry *target_rule;
 
-                       if (!chain_head) {
-                               g_free(xt_t->t);
-                               return NULL;
-                       }
-
                        target_rule = chain_head->next->data;
                        target->verdict = target_rule->offset;
                }
-- 
1.8.4.474.g128a96c

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to