1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

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

svn path=/trunk/thread/; revision=3264
This commit is contained in:
Michael Smith 2002-04-30 06:50:47 +00:00
parent d4d6716a52
commit 3379751e19

View File

@ -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;
_block_signals();
@ -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_detach(thread->sys_thread);
}
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);