]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix xml parser in ivr menus
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Jan 2007 15:44:01 +0000 (15:44 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 18 Jan 2007 15:44:01 +0000 (15:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3986 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index 69c087402c658be0cb593daf9ba01c01d4b49740..7f7214f2208426f8b61d2fbe2172f82214e9a411 100644 (file)
@@ -405,7 +405,6 @@ static void ivr_application_function(switch_core_session_t *session, char *data)
 
                // Open the config from the xml registry
                if ((cxml = switch_xml_open_cfg(ivr_cf_name, &cfg, NULL)) != NULL) {
-                       switch_xml_free(cxml);
                        if ((xml_menus = switch_xml_child(cfg, "menus"))) {
                                xml_menu = switch_xml_find_child(xml_menus, "menu", "name", params);
 
@@ -431,6 +430,7 @@ static void ivr_application_function(switch_core_session_t *session, char *data)
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find menu '%s'\n", params);
                                }
                        }
+                       switch_xml_free(cxml);
                } else {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", ivr_cf_name);
                }