fix potential xml handle leak from previous committ.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4261 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-02-14 17:34:16 +00:00
parent 251723ba41
commit c48792c61c

View File

@ -454,18 +454,18 @@ static void ivr_application_function(switch_core_session_t *session, char *data)
&& switch_ivr_menu_stack_xml_build(xml_ctx,&menu_stack,xml_menus,xml_menu) == SWITCH_STATUS_SUCCESS) && switch_ivr_menu_stack_xml_build(xml_ctx,&menu_stack,xml_menus,xml_menu) == SWITCH_STATUS_SUCCESS)
{ {
switch_xml_free(cxml); switch_xml_free(cxml);
cxml = NULL;
switch_channel_pre_answer(channel); switch_channel_pre_answer(channel);
switch_ivr_menu_execute(session,menu_stack,params,NULL); switch_ivr_menu_execute(session,menu_stack,params,NULL);
switch_ivr_menu_stack_free(menu_stack); switch_ivr_menu_stack_free(menu_stack);
} else { } else {
switch_xml_free(cxml);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create menu '%s'\n", params); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create menu '%s'\n", params);
} }
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find menu '%s'\n", params); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find menu '%s'\n", params);
} }
} }
switch_xml_free(cxml);
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", ivr_cf_name); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", ivr_cf_name);
} }