[Freeswitch-svn] [commit] r4261 - freeswitch/trunk/src/mod/applications/mod_dptools

Freeswitch SVN mikej at freeswitch.org
Wed Feb 14 12:34:16 EST 2007


Author: mikej
Date: Wed Feb 14 12:34:16 2007
New Revision: 4261

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c

Log:
fix potential xml handle leak from previous committ.

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Wed Feb 14 12:34:16 2007
@@ -454,18 +454,18 @@
 						&& switch_ivr_menu_stack_xml_build(xml_ctx,&menu_stack,xml_menus,xml_menu) == SWITCH_STATUS_SUCCESS)
 					{
 						switch_xml_free(cxml);
+						cxml = NULL;
 						switch_channel_pre_answer(channel);
 						switch_ivr_menu_execute(session,menu_stack,params,NULL);
 						switch_ivr_menu_stack_free(menu_stack);
 					} else {
-						switch_xml_free(cxml);
 						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create menu '%s'\n", params);
 					}
 				} else {
 					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);
 		}



More information about the Freeswitch-svn mailing list