[asterisk-commits] russell: branch 1.6.2 r296221 - in /branches/1.6.2: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 24 17:28:24 CST 2010


Author: russell
Date: Wed Nov 24 17:28:19 2010
New Revision: 296221

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

........
  r296213 | russell | 2010-11-24 17:26:43 -0600 (Wed, 24 Nov 2010) | 6 lines
  
  Make Asterisk less crashy.
  
  Since we might not put a new translation path on the channel, go ahead and
  set it to NULL right after destroying the old one to ensure we don't try
  to free an invalid translation path later on.
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/channel.c

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

Modified: branches/1.6.2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/channel.c?view=diff&rev=296221&r1=296220&r2=296221
==============================================================================
--- branches/1.6.2/main/channel.c (original)
+++ branches/1.6.2/main/channel.c Wed Nov 24 17:28:19 2010
@@ -3972,8 +3972,10 @@
 	/* User perspective is fmt */
 	*format = fmt;
 	/* Free any read translation we have right now */
-	if (*trans)
+	if (*trans) {
 		ast_translator_free_path(*trans);
+		*trans = NULL;
+	}
 	/* Build a translation path from the raw format to the desired format */
 	if (*format == *rawformat) {
 		/*




More information about the asterisk-commits mailing list