[svn-commits] russell: trunk r131422 - in /trunk: ./ channels/chan_iax2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 16 15:48:27 CDT 2008


Author: russell
Date: Wed Jul 16 15:48:27 2008
New Revision: 131422

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131422
Log:
Merged revisions 131421 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131421 | russell | 2008-07-16 15:47:53 -0500 (Wed, 16 Jul 2008) | 7 lines

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:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=131422&r1=131421&r2=131422
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Jul 16 15:48:27 2008
@@ -3738,6 +3738,12 @@
 			ast_debug(1, "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]);
 	ast_verb(3, "Hungup '%s'\n", c->name);




More information about the svn-commits mailing list