[asterisk-commits] tilghman: branch 1.4 r89298 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 15 12:05:56 CST 2007


Author: tilghman
Date: Thu Nov 15 12:05:56 2007
New Revision: 89298

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89298
Log:
Yet another memory corruption issue.
Reported by: atis
Patch by: tilghman
Fixes issue #10923

Modified:
    branches/1.4/channels/chan_iax2.c

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=89298&r1=89297&r2=89298
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Thu Nov 15 12:05:56 2007
@@ -8315,6 +8315,18 @@
 		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)
 	*/




More information about the asterisk-commits mailing list