diff --git a/net/icmp/icmp_conn.c b/net/icmp/icmp_conn.c index b28cf9edb2..079b322055 100644 --- a/net/icmp/icmp_conn.c +++ b/net/icmp/icmp_conn.c @@ -124,7 +124,7 @@ FAR struct icmp_conn_s *icmp_alloc(void) { for (ret = 0; ret < CONFIG_NET_ICMP_NCONNS; ret++) { - dq_addlast(&conn[ret].node, &g_free_retcmp_connectretons); + dq_addlast(&conn[ret].node, &g_free_icmp_connections); } } } diff --git a/net/icmpv6/icmpv6_conn.c b/net/icmpv6/icmpv6_conn.c index fe4903b241..ce2a6df4c1 100644 --- a/net/icmpv6/icmpv6_conn.c +++ b/net/icmpv6/icmpv6_conn.c @@ -124,7 +124,7 @@ FAR struct icmpv6_conn_s *icmpv6_alloc(void) { for (ret = 0; ret < CONFIG_NET_ICMPv6_NCONNS; ret++) { - dq_addlast(&conn[i].node, &g_free_icmpv6_connections); + dq_addlast(&conn[ret].node, &g_free_icmpv6_connections); } } }