From: Joshua Colp Date: Tue, 5 Jun 2007 15:22:30 +0000 (+0000) Subject: Only muck with the thread structure if an idle one was found/created. X-Git-Tag: 1.4.5~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24922406f482b3d45e76d6a883f73de0c0d58464;p=thirdparty%2Fasterisk.git Only muck with the thread structure if an idle one was found/created. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@67304 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 49b95c5c2c..438b12f68c 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -888,8 +888,10 @@ static struct iax2_thread *find_idle_thread(void) /* this thread is not processing a full frame (since it is idle), so ensure that the field for the full frame call number is empty */ - thread->ffcallno = 0; - memset(&thread->ffsin, 0, sizeof(thread->ffsin)); + if (thread) { + thread->ffcallno = 0; + memset(&thread->ffsin, 0, sizeof(thread->ffsin)); + } return thread; }