summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-07-18 22:52:54 +0000
committerRussell Bryant <russell@russellbryant.com>2007-07-18 22:52:54 +0000
commit5272289355575e74f73e9054e7994fc4c1f2af48 (patch)
tree42cff2c5599470adc161cca62d6e1361969c6bb5 /channels
parent9c99cba37375b9fda783826c4fb0bf660b98c804 (diff)
I thought I noticed a memory leak earlier when I saw that the contents of this
list were not destroyed when the module is unloaded. However, after reading the code related to the use of this list a lot today, I realized that it isn't necessary. So, I have added a comment to explain why it isn't necessary. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 6fd9b16ca..f9cd417dd 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -646,6 +646,13 @@ struct chan_iax2_pvt {
int frames_received;
};
+/*!
+ * \brief a list of frames that may need to be retransmitted
+ *
+ * \note The contents of this list do not need to be explicitly destroyed
+ * on module unload. This is because all active calls are destroyed, and
+ * all frames in this queue will get destroyed as a part of that process.
+ */
static AST_LIST_HEAD_STATIC(frame_queue, iax_frame);
static AST_LIST_HEAD_STATIC(users, iax2_user);
@@ -10807,9 +10814,10 @@ static int __unload_module(void)
ast_netsock_release(netsock);
ast_netsock_release(outsock);
- for (x=0;x<IAX_MAX_CALLS;x++)
+ for (x = 0; x < IAX_MAX_CALLS; x++) {
if (iaxs[x])
iax2_destroy(x);
+ }
ast_manager_unregister( "IAXpeers" );
ast_manager_unregister( "IAXnetstats" );
ast_unregister_application(papp);