If there is a problem reading the dictionary file, don't leak memory...

This commit is contained in:
William King 2013-05-24 19:55:37 -07:00
parent 2e6d3a1f2a
commit 9ea90341f7
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,9 @@ switch_status_t mod_xml_radius_new_handle(rc_handle **new_handle, switch_xml_t x
}
if (strncmp(var, "dictionary", 10) == 0) {
rc_read_dictionary(*new_handle, val);
if ( rc_read_dictionary(*new_handle, val) != 0) {
goto err;
}
} else if (rc_add_config(*new_handle, var, val, "mod_xml_radius", 0) != 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error adding param '%s' with value '%s' \n", var, val);
goto err;