diff --git a/net/mld/mld_group.c b/net/mld/mld_group.c index 5a4dbf2c4a..799aa29f16 100644 --- a/net/mld/mld_group.c +++ b/net/mld/mld_group.c @@ -75,7 +75,7 @@ static int mld_ngroups(FAR struct net_driver_s *dev) { FAR struct mld_group_s *group; - int ngroups; + int ngroups = 0; /* Count the number of groups in the group list */ @@ -274,9 +274,6 @@ void mld_grpfree(FAR struct net_driver_s *dev, FAR struct mld_group_s *group) #ifndef CONFIG_CONFIG_NET_MLD_ROUTER /* If there are no longer any groups, then stop the general query and v1 * compatibility timers. - * - * REVISIT: Does not work. Continues to query after the last group - * leaves. */ if (mld_ngroups(dev) < 1) diff --git a/net/mld/mld_leave.c b/net/mld/mld_leave.c index 3894d010ca..1dd4b2e81e 100644 --- a/net/mld/mld_leave.c +++ b/net/mld/mld_leave.c @@ -196,15 +196,15 @@ int mld_leavegroup(FAR const struct ipv6_mreq *mrec) CLR_MLD_SCHEDMSG(group->flags); CLR_MLD_WAITMSG(group->flags); - /* Free the group structure */ + /* Free the group structure */ - mld_grpfree(dev, group); + mld_grpfree(dev, group); - /* REVISIT: It is expected that higher level logic will remove - * the routing table entry for the old multicast address. That - * is not done here. - */ - } + /* REVISIT: It is expected that higher level logic will remove + * the routing table entry for the old multicast address. That + * is not done here. + */ + } } return OK;