]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
If there is a problem reading the dictionary file, don't leak memory...
authorWilliam King <william.king@quentustech.com>
Sat, 25 May 2013 02:55:37 +0000 (19:55 -0700)
committerWilliam King <william.king@quentustech.com>
Sat, 25 May 2013 02:55:37 +0000 (19:55 -0700)
src/mod/xml_int/mod_xml_radius/mod_xml_radius.c

index 3ab8b1e8a05e28189c97b1fd0ffc64200ddafaab..afa9a9c5b43f3067ea2ba638fee9d6ed1b3d99ac 100644 (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;