This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b791e27a8d7ce2d1d0b430d2f7285c067a62cb16
Author: wangchen <[email protected]>
AuthorDate: Fri Aug 30 16:07:57 2024 +0800

    igmp_group.c:add work_cancel_sync in igmp_grpfree
    Signed-off-by: wangchen <[email protected]>
---
 net/igmp/igmp_group.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/igmp/igmp_group.c b/net/igmp/igmp_group.c
index 1050a99e33..b84c085b8a 100644
--- a/net/igmp/igmp_group.c
+++ b/net/igmp/igmp_group.c
@@ -218,6 +218,10 @@ void igmp_grpfree(FAR struct net_driver_s *dev,
 
   wd_cancel(&group->wdog);
 
+  /* Cancel the workqueue */
+
+  work_cancel_sync(LPWORK, &group->work);
+
   /* Remove the group structure from the group list in the device structure */
 
   sq_rem((FAR sq_entry_t *)group, &dev->d_igmp_grplist);

Reply via email to