AST_LIST_UNLOCK(&idle_list);
/* If we popped a thread off the idle list, just return it */
- if (thread)
+ if (thread) {
+ memset(&thread->ffinfo, 0, sizeof(thread->ffinfo));
return thread;
+ }
/* Pop the head of the dynamic list off */
AST_LIST_LOCK(&dynamic_list);
AST_LIST_UNLOCK(&dynamic_list);
/* If we popped a thread off the dynamic list, just return it */
- if (thread)
+ if (thread) {
+ memset(&thread->ffinfo, 0, sizeof(thread->ffinfo));
return thread;
+ }
/* If we can't create a new dynamic thread for any reason, return no thread at all */
if (iaxdynamicthreadcount >= iaxmaxthreadcount || !(thread = ast_calloc(1, sizeof(*thread))))