[Freeswitch-svn] [commit] r12873 - in freeswitch/trunk/src: . mod/applications/mod_dptools mod/endpoints/mod_sofia

FreeSWITCH SVN anthm at freeswitch.org
Wed Apr 1 13:11:36 PDT 2009


Author: anthm
Date: Wed Apr  1 15:11:36 2009
New Revision: 12873

Log:
FSCORE-347

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
   freeswitch/trunk/src/switch_ivr_play_say.c

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 Apr  1 15:11:36 2009
@@ -385,6 +385,7 @@
 				switch_safe_free(e_data.uuid_list[x]);
 			}
 
+			free(sql);
 			switch_core_db_close(db);
 
 		} else {

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	Wed Apr  1 15:11:36 2009
@@ -1113,8 +1113,8 @@
 		const char *from_id = switch_str_nil(switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Number"));
 		const char *to_user = switch_str_nil(switch_event_get_header(helper->event, "variable_sip_to_user"));
 		const char *from_user = switch_str_nil(switch_event_get_header(helper->event, "variable_sip_from_user"));
-		const char *clean_to_user = NULL;
-		const char *clean_from_user = NULL;
+		char *clean_to_user = NULL;
+		char *clean_from_user = NULL;
 		const char *p_to_user = switch_str_nil(switch_event_get_header(helper->event, "to-user"));
 #if 0
 		char *buf;
@@ -1221,6 +1221,9 @@
 						stream.write_function(&stream, "</remote>\n");
 					}
 				}
+
+				switch_safe_free(clean_to_user);
+				switch_safe_free(clean_from_user);
 			}
 			if (is_dialog) {
 				stream.write_function(&stream, "</dialog>\n");

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Wed Apr  1 15:11:36 2009
@@ -276,7 +276,7 @@
 						status = switch_ivr_play_file(session, NULL, odata, args);
 					} else if (!strcasecmp(func, "break")) {
 						done = 1;
-						break;
+						/* must allow the switch_safe_free below to execute or we leak - do not break here */
 					} else if (!strcasecmp(func, "execute")) {
 						switch_application_interface_t *app;
 						char *cmd, *cmd_args;



More information about the Freeswitch-svn mailing list