stream->write_function(stream, "%25s\t%32s\t%s\t%6.2f\t%u/%u\t%u/%u",
pkey, gp->register_to, sofia_state_names[gp->state], gp->ping_time,
gp->ib_failed_calls, gp->ib_calls, gp->ob_failed_calls, gp->ob_calls);
+ free(pkey);
if (gp->state == REG_STATE_FAILED || gp->state == REG_STATE_TRYING) {
time_t now = switch_epoch_time_now(NULL);
switch_safe_free(route_uri);
sofia_glue_free_destination(dst);
+ free(extra_headers);
free(id);
free(contact);
const char *csta_event = switch_event_get_header(event, "Feature-Event");
char *ct = "application/x-as-feature-event+xml";
+ char *ct_m = NULL;
sofia_profile_t *profile;
stream.write_function(&stream, "--%s--\r\n", boundary_string);
- ct = switch_mprintf("multipart/mixed; boundary=\"%s\"", boundary_string);
+ ct_m = switch_mprintf("multipart/mixed; boundary=\"%s\"", boundary_string);
+ ct = ct_m;
} else {
char *fwd_type = NULL;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "missing something\n");
}
+ switch_safe_free(ct_m);
}
break;
case SWITCH_EVENT_SEND_MESSAGE:
if (zstr(name) || switch_regex_match(name, "^[\\w\\.\\-\\_]+$") != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Ignoring invalid name '%s'\n", name ? name : "NULL");
+ free(pkey);
goto skip;
}
home = NULL;
}
- if (etmp) {
- switch_safe_free(etmp);
- }
+ switch_safe_free(etmp);
}
char *remote_user;
char *remote_host;
char *remote_uri;
- char *local_user_param = "";
+ char *local_user_param = NULL;
char remote_display_buf[512];
char *buf_to_free = NULL;
int bInternal = 0;
data,
uuid, call_id, to_tag, from_tag, direction,
state,
- local_user, local_user, local_host, local_user_param,
+ local_user, local_user, local_host, switch_str_nil(local_user_param),
local_user, local_host,
!strcasecmp(event_status, "hold") ? "no" : "yes",
remote_display_buf, remote_user, remote_host,
remote_uri
);
switch_core_hash_insert(h->hash, key, tmp);
+ switch_safe_free(local_user_param);
switch_safe_free(buf_to_free);
h->rowcount++;