]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODEVENT-68
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 18 Aug 2010 14:20:59 +0000 (09:20 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 18 Aug 2010 14:20:59 +0000 (09:20 -0500)
src/mod/event_handlers/mod_event_socket/mod_event_socket.c

index 3f7d680d529008c2b9b131aa4a11f5a1e613d8f7..be417600a22480feaf8b22672d325924eac9583f 100644 (file)
@@ -1160,6 +1160,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
                                                                                        status = switch_socket_recv(listener->sock, p, &mlen);
 
                                                                                        if (prefs.done || (!SWITCH_STATUS_IS_BREAK(status) && status != SWITCH_STATUS_SUCCESS)) {
+                                                                                               free(body);                                                                                             
                                                                                                return SWITCH_STATUS_FALSE;
                                                                                        }
 
@@ -1462,6 +1463,7 @@ static switch_bool_t auth_api_command(listener_t *listener, const char *api_cmd,
                        if (!strcasecmp(sneaky_commands[x], check_cmd)) {
                                if (check_cmd == api_cmd) {
                                        if (arg) {
+                                               switch_safe_free(dup_arg);
                                                dup_arg = strdup(arg);
                                                check_cmd = dup_arg;
                                                if ((next = strchr(check_cmd, ' '))) {