diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-15 18:11:36 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-15 18:11:36 +0000 |
commit | fc74a46ee25c8f3817b3bbbbb62a0870d731aaf8 (patch) | |
tree | 9d68e5bc0e4966f25512d1f5490fc1af1fdd9ac3 /channels | |
parent | 1bf63d1c5bbbaa1977e4c7c3edb47d32983db31c (diff) |
Merged revisions 89298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89298 | tilghman | 2007-11-15 12:05:56 -0600 (Thu, 15 Nov 2007) | 5 lines
Yet another memory corruption issue.
Reported by: atis
Patch by: tilghman
Fixes issue #10923
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 729b89db5..ce533a250 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -9096,6 +9096,18 @@ static void *iax2_process_thread(void *data) handle_deferred_full_frames(thread); } + /*!\note For some reason, idle threads are exiting without being removed + * from an idle list, which is causing memory corruption. Forcibly remove + * it from the list, if it's there. + */ + AST_LIST_LOCK(&idle_list); + AST_LIST_REMOVE(&idle_list, thread, list); + AST_LIST_UNLOCK(&idle_list); + + AST_LIST_LOCK(&dynamic_list); + AST_LIST_REMOVE(&dynamic_list, thread, list); + AST_LIST_UNLOCK(&dynamic_list); + /* I am exiting here on my own volition, I need to clean up my own data structures * Assume that I am no longer in any of the lists (idle, active, or dynamic) */ |