mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08:00
TC: release the sem in cleanup
The sem that has been created should be deleted. The sem that has been inited should be detached.
This commit is contained in:
@@ -100,6 +100,12 @@ static void _tc_cleanup()
|
||||
rt_thread_delete(t2);
|
||||
rt_thread_delete(worker);
|
||||
|
||||
if (sem)
|
||||
{
|
||||
rt_sem_delete(sem);
|
||||
sem = RT_NULL;
|
||||
}
|
||||
|
||||
if (t1_count > t2_count)
|
||||
tc_done(TC_STAT_FAILED);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user