Commit 0dbd488c authored by Michael Smith's avatar Michael Smith
Browse files

Don't use start after freeing it in thread startup code.

svn path=/trunk/thread/; revision=3264
parent 338f6a0a
......@@ -574,6 +574,7 @@ static void *_start_routine(void *arg)
void *(*start_routine)(void *) = start->start_routine;
void *real_arg = start->arg;
thread_t *thread = start->thread;
int detach = start->detached;
......@@ -587,7 +588,7 @@ static void *_start_routine(void *arg)
LOG_INFO4("Added thread %d [%s] started at [%s:%d]", thread->thread_id, thread->name, thread->file, thread->line);
if (start->detached) {
if (detach) {
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment