diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c index 81efbf8e7c..1e76720ecd 100644 --- a/res/res_timing_pthread.c +++ b/res/res_timing_pthread.c @@ -143,7 +143,7 @@ static void *pthread_timer_open(void) ast_cond_signal(&timing_thread.cond); ast_mutex_unlock(&timing_thread.lock); } - ao2_link(pthread_timers, timer); + ao2_link_flags(pthread_timers, timer, OBJ_NOLOCK); ao2_unlock(pthread_timers); return timer; @@ -153,6 +153,7 @@ static void pthread_timer_close(void *data) { struct pthread_timer *timer = data; + ao2_unlink(pthread_timers, timer); ao2_ref(timer, -1); }