Skip to content

Commit c3dd408

Browse files
committed
fix:tencentos:memory leak issue in platform_thread_destroy
In tencentos implementation of platform_thread_destroy, stack size is getting freed where as stack base is suppose to be freed. platform_thread_t structure varaible is also not freed. this patch fix both the issues Signed-off-by: Ajay Bhargav <ajay.bhargav@waybyte.in>
1 parent 4caadb7 commit c3dd408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/TencentOS-tiny/platform_thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ void platform_thread_destroy(platform_thread_t* thread)
5959
{
6060
if (NULL != thread)
6161
tos_task_destroy(&(thread->thread));
62+
platform_memory_free(thread->thread.stk_base);
6263
platform_memory_free(&(thread->thread));
63-
platform_memory_free(&(thread->thread.stk_size));
6464
}
6565

6666

0 commit comments

Comments
 (0)