]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix memory corruption in mod_erlang_event
authorTravis Cross <tc@traviscross.com>
Sat, 25 May 2013 21:20:41 +0000 (21:20 +0000)
committerTravis Cross <tc@traviscross.com>
Sat, 25 May 2013 21:46:58 +0000 (21:46 +0000)
Thanks-to: Alexandre Snarskii <snar@snar.spb.ru>
FS-5465 --resolve

src/mod/event_handlers/mod_erlang_event/handle_msg.c

index 21e7376e98cc2c27568e5c09286210e4a50111ae..75d6c2043433cbb6eb872ef2a0f9ca455a8aa0c4 100644 (file)
@@ -184,7 +184,7 @@ static switch_status_t handle_msg_fetch_reply(listener_t *listener, ei_x_buff *
                                        /* alright, we've got the lock and we're the first to reply */
 
                                        /* clone the reply so it doesn't get destroyed on us */
-                                       ei_x_buff *nbuf = malloc(sizeof(nbuf));
+                                       ei_x_buff *nbuf = malloc(sizeof(*nbuf));
                                        nbuf->buff = malloc(buf->buffsz);
                                        memcpy(nbuf->buff, buf->buff, buf->buffsz);
                                        nbuf->index = buf->index;