[Freeswitch-svn] [commit] r9141 - freeswitch/trunk/src/mod/event_handlers/mod_event_socket

Freeswitch SVN anthm at freeswitch.org
Wed Jul 23 09:45:35 EDT 2008


Author: anthm
Date: Wed Jul 23 09:45:35 2008
New Revision: 9141

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c

Log:
init mem

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Wed Jul 23 09:45:35 2008
@@ -486,11 +486,12 @@
 									clen = atoi(val);
 									
 									if (clen > 0) {
-										char *body = malloc(clen + 1);
-										char *ptr = body;
+										char *body;
+										char *ptr;
 										
-										switch_assert(body);
+										switch_zmalloc(body, clen + 1);
 
+										ptr = body;
 										while(clen > 0) {
 											mlen = clen;
 											



More information about the Freeswitch-svn mailing list