]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
init mem
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 23 Jul 2008 13:45:35 +0000 (13:45 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 23 Jul 2008 13:45:35 +0000 (13:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9141 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_event_socket/mod_event_socket.c

index 140bfb7f7d7f97d41117edfd468a890cf560cfee..5a0adbedc1330c988480ba554d7b25e613e0c428 100644 (file)
@@ -486,11 +486,12 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
                                                                        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;