From: Anthony Minessale Date: Thu, 18 Jan 2007 15:44:01 +0000 (+0000) Subject: fix xml parser in ivr menus X-Git-Tag: v1.0-beta1~1342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c802e31964ecc5f839b334c16730d100744a6ca;p=thirdparty%2Ffreeswitch.git fix xml parser in ivr menus git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3986 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 69c087402c..7f7214f220 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -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); }