From 5e26b4c58536a95744b96aa141843de86d23838a Mon Sep 17 00:00:00 2001 From: zms123456 <85141075+zmshahaha@users.noreply.github.com> Date: Wed, 20 Mar 2024 08:01:49 +0800 Subject: [PATCH] [components/dirver]Fix issue of not releasing sem resource --- components/drivers/ipc/workqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/drivers/ipc/workqueue.c b/components/drivers/ipc/workqueue.c index cb958c8710..984c36323f 100644 --- a/components/drivers/ipc/workqueue.c +++ b/components/drivers/ipc/workqueue.c @@ -252,6 +252,7 @@ struct rt_workqueue *rt_workqueue_create(const char *name, rt_uint16_t stack_siz queue->work_thread = rt_thread_create(name, _workqueue_thread_entry, queue, stack_size, priority, 10); if (queue->work_thread == RT_NULL) { + rt_sem_detach(&(queue->sem)); RT_KERNEL_FREE(queue); return RT_NULL; }