From: Joshua Colp Date: Mon, 2 Mar 2009 14:28:09 +0000 (+0000) Subject: Do not try to remove a registration scheduled item if the scheduler context has alrea... X-Git-Tag: 1.6.2.0-beta1~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=775b30307fd8c4c4d77e41275bcfb4b018e9daef;p=thirdparty%2Fasterisk.git Do not try to remove a registration scheduled item if the scheduler context has already been destroyed. (closes issue #14580) Reported by: alecdavis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179323 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 3246bae5a2..46b3b5ff81 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -11184,7 +11184,9 @@ static void delete_users(void) AST_LIST_LOCK(®istrations); while ((reg = AST_LIST_REMOVE_HEAD(®istrations, entry))) { - ast_sched_thread_del(sched, reg->expire); + if (sched) { + ast_sched_thread_del(sched, reg->expire); + } if (reg->callno) { int callno = reg->callno; ast_mutex_lock(&iaxsl[callno]);