From: Joshua Colp Date: Sat, 30 Dec 2006 03:37:22 +0000 (+0000) Subject: Initialize the packet queue in load_module instead of just declaring the list with... X-Git-Tag: 1.4.1~358 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37e5a39d7648fab4575efb93817dcf660bf89730;p=thirdparty%2Fasterisk.git Initialize the packet queue in load_module instead of just declaring the list with the default value. (issue #8695 reported by ssokol) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49063 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 287ad2e0ce..2c80242b84 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -624,9 +624,7 @@ struct chan_iax2_pvt { static struct ast_iax2_queue { AST_LIST_HEAD(, iax_frame) queue; int count; -} iaxq = { - .queue = AST_LIST_HEAD_INIT_VALUE -}; +} iaxq; static AST_LIST_HEAD_STATIC(users, iax2_user); @@ -9952,6 +9950,8 @@ static int __unload_module(void) AST_LIST_TRAVERSE_SAFE_END AST_LIST_UNLOCK(&dynamic_list); + AST_LIST_HEAD_DESTROY(&iaxq.queue); + ast_netsock_release(netsock); for (x=0;x