Avoid leaking memory on sofia profile reload
We were leaking the string values of apply-candidate-acl parameters.
This commit is contained in:
parent
63351a1061
commit
75feed68fc
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue