From 4edf66be98a2fe20819a7f227f8728f24e0dcc11 Mon Sep 17 00:00:00 2001 From: William King Date: Fri, 24 May 2013 19:55:37 -0700 Subject: [PATCH] If there is a problem reading the dictionary file, don't leak memory... --- src/mod/xml_int/mod_xml_radius/mod_xml_radius.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c b/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c index 3ab8b1e8a0..afa9a9c5b4 100644 --- a/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c +++ b/src/mod/xml_int/mod_xml_radius/mod_xml_radius.c @@ -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;