[asterisk-commits] russell: trunk r38291 - in /trunk: ./ channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jul 26 19:00:21 MST 2006


Author: russell
Date: Wed Jul 26 21:00:20 2006
New Revision: 38291

URL: http://svn.digium.com/view/asterisk?rev=38291&view=rev
Log:
Merged revisions 38288 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38288 | russell | 2006-07-26 21:58:41 -0400 (Wed, 26 Jul 2006) | 3 lines

fix a crash when MALLOC_DEBUG is enabled and the regexten is enabled. The crash
would occur when the extension got removed. (fixes issue #7484)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

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

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=38291&r1=38290&r2=38291&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jul 26 21:00:20 2006
@@ -1537,6 +1537,15 @@
 	set_udptl_peer: sip_set_udptl_peer,
 };
 
+#ifdef __AST_DEBUG_MALLOC
+static void FREE(void *ptr)
+{
+	free(ptr);
+}
+#else
+#define FREE free
+#endif
+
 /*! \brief Convert transfer status to string */
 static char *referstatus2str(enum referstatus rstatus)
 {
@@ -2243,7 +2252,7 @@
 		}
 		if (onoff)
 			ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
-				 ast_strdup(peer->name), free, "SIP");
+				 ast_strdup(peer->name), FREE, "SIP");
 		else
 			ast_context_remove_extension(context, ext, 1, NULL);
 	}



More information about the asterisk-commits mailing list