]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_kazoo] Remove wrong usage of switch_safe_strdup() causing leaks in kazoo_tweaks
authorAndrey Volk <andywolk@gmail.com>
Thu, 1 Apr 2021 14:30:33 +0000 (17:30 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:19:26 +0000 (20:19 +0300)
src/mod/event_handlers/mod_kazoo/kazoo_tweaks.c

index bb7c792b889b6c89c6bd229f581a600d311d7f7a..e647871855a644962afc8d052958d264f5d75771 100644 (file)
@@ -226,7 +226,6 @@ static void kz_tweaks_channel_transferor_event_handler(switch_event_t *event)
                                        switch_event_fire(&evt);
                                }
                                switch_core_session_rwunlock(session);
-                               switch_safe_strdup(prv_interaction_id);
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TRANSFEROR NO UUID SESSION: %s , %s , %s \n", uuid, dest_call_id, dest_peer_uuid);
                        }
@@ -240,7 +239,6 @@ static void kz_tweaks_channel_transferor_event_handler(switch_event_t *event)
                                        switch_event_fire(&evt);
                                }
                                switch_core_session_rwunlock(session);
-                               switch_safe_strdup(prv_interaction_id);
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TRANSFEROR NO PEER SESSION: %s , %s , %s \n", uuid, dest_call_id, dest_peer_uuid);
                        }
@@ -254,11 +252,9 @@ static void kz_tweaks_channel_transferor_event_handler(switch_event_t *event)
                                        switch_event_fire(&evt);
                                }
                                switch_core_session_rwunlock(session);
-                               switch_safe_strdup(prv_interaction_id);
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TRANSFEROR NO PEER SESSION: %s , %s , %s \n", uuid, dest_call_id, dest_peer_uuid);
                        }
-                       switch_safe_strdup(interaction_id);
                } else {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TRANSFEROR ID = NULL : %s , %s , %s \n", uuid, dest_call_id, dest_peer_uuid);
                }
@@ -441,7 +437,6 @@ static switch_status_t kz_tweaks_handle_replaces_call_id(switch_core_session_t *
                                for(i = 0; bridge_variables[i] != NULL; i++) {
                                        const char *val = switch_channel_get_variable_dup(replaced_call_channel, bridge_variables[i], SWITCH_TRUE, -1);
                                        switch_channel_set_variable(channel, bridge_variables[i], val);
-                                       switch_safe_strdup(val);
                                }
                                if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_DATA) == SWITCH_STATUS_SUCCESS) {
                                        switch_channel_event_set_data(channel, event);