From b791e27a8d7ce2d1d0b430d2f7285c067a62cb16 Mon Sep 17 00:00:00 2001 From: wangchen Date: Fri, 30 Aug 2024 16:07:57 +0800 Subject: [PATCH] igmp_group.c:add work_cancel_sync in igmp_grpfree Signed-off-by: wangchen --- 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);