[asterisk-commits] russell: branch 1.4 r131421 - /branches/1.4/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 16 15:47:54 CDT 2008


Author: russell
Date: Wed Jul 16 15:47:53 2008
New Revision: 131421

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131421
Log:
Always ensure that the channel's tech_pvt reference is NULL after calling the
destroy callback.
(closes issue #13060)
Reported by: jpgrayson
Patches:
      chan_iax2_tech_pvt_crash.patch uploaded by jpgrayson (license 492)

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=131421&r1=131420&r2=131421
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Wed Jul 16 15:47:53 2008
@@ -3431,6 +3431,12 @@
 				ast_log(LOG_DEBUG, "Really destroying %s now...\n", c->name);
 			iax2_destroy(callno);
 		}
+	} else if (c->tech_pvt) {
+		/* If this call no longer exists, but the channel still
+		 * references it we need to set the channel's tech_pvt to null
+		 * to avoid ast_channel_free() trying to free it.
+		 */
+		c->tech_pvt = NULL;
 	}
 	ast_mutex_unlock(&iaxsl[callno]);
 	if (option_verbose > 2) 




More information about the asterisk-commits mailing list