FS-8643: fix mod_sofia memory leaks

This commit is contained in:
Armen Babikyan
2015-12-09 20:36:41 -08:00
parent cae255395f
commit e23aa12a2d
3 changed files with 11 additions and 6 deletions
+2 -3
View File
@@ -3384,6 +3384,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
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;
}
@@ -8697,9 +8698,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
home = NULL;
}
if (etmp) {
switch_safe_free(etmp);
}
switch_safe_free(etmp);
}