Avoid leaking memory on sofia profile reload

We were leaking the string values of apply-candidate-acl parameters.
This commit is contained in:
Travis Cross 2014-06-26 08:39:55 +00:00
parent 63351a1061
commit 75feed68fc
1 changed files with 1 additions and 1 deletions

View File

@ -4909,7 +4909,7 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
} else if (!strcasecmp(var, "apply-candidate-acl")) {
if (profile->cand_acl_count < SWITCH_MAX_CAND_ACL) {
profile->cand_acl[profile->cand_acl_count++] = strdup(val);
profile->cand_acl[profile->cand_acl_count++] = switch_core_strdup(profile->pool, val);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Max acl records of %d reached\n", SWITCH_MAX_CAND_ACL);
}