We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3841c3 commit 0fd8976Copy full SHA for 0fd8976
components/libc/posix/pthreads/pthread.c
@@ -169,9 +169,6 @@ void _pthread_data_destroy(_pthread_data_t *ptd)
169
/* clean magic */
170
ptd->magic = 0x0;
171
172
- /* clear the "ptd->tid->pthread_data" */
173
- ptd->tid->pthread_data = RT_NULL;
174
-
175
/* free ptd */
176
rt_free(ptd);
177
}
@@ -185,6 +182,9 @@ static void _pthread_cleanup(rt_thread_t tid)
185
182
/* restore tid stack */
186
183
rt_free(tid->stack_addr);
187
184
+ /* clear the "ptd->tid->pthread_data" */
+ tid->pthread_data = RT_NULL;
+
188
/* restore tid control block */
189
rt_free(tid);
190
0 commit comments