]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-347
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Apr 2009 20:11:36 +0000 (20:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Apr 2009 20:11:36 +0000 (20:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12873 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c
src/mod/endpoints/mod_sofia/sofia_presence.c
src/switch_ivr_play_say.c

index bcae38ee768f7cf564f7e32852f7031435d8966e..f27dbf1acb4f2d6c86dc0303df5a4172a5a03b04 100644 (file)
@@ -385,6 +385,7 @@ SWITCH_STANDARD_APP(eavesdrop_function)
                                switch_safe_free(e_data.uuid_list[x]);
                        }
 
+                       free(sql);
                        switch_core_db_close(db);
 
                } else {
index 1a8dcf26dd2d4e12807048317e4ad37ae30e03f6..ac49eccc99ac7d9f3e24981295bcc3ce2074c47c 100644 (file)
@@ -1113,8 +1113,8 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                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 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                                                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");
index 1d2c57107f4168e983f2658cf32916ea121343bf..2fa391de293c0f681091b996df6f815c347045e9 100644 (file)
@@ -276,7 +276,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
                                                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;