fix memory leak caused by regression from FS-2747

This commit is contained in:
Anthony Minessale 2010-10-06 16:04:42 -05:00
parent dc4d19e9f6
commit 6c4cb07bac
1 changed files with 2 additions and 4 deletions

View File

@ -742,7 +742,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
} }
sofia_glue_execute_sql_callback(profile, NULL, sql, sofia_presence_sub_callback, &helper); sofia_glue_execute_sql_callback(profile, NULL, sql, sofia_presence_sub_callback, &helper);
switch_safe_free(sql);
sql = switch_mprintf("update sip_subscriptions set version=version+1 where event='dialog' and sub_to_user='%q' " sql = switch_mprintf("update sip_subscriptions set version=version+1 where event='dialog' and sub_to_user='%q' "
"and (sub_to_host='%q' or presence_hosts like '%%%q%%') " "and (sub_to_host='%q' or presence_hosts like '%%%q%%') "
@ -757,8 +757,6 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
event->event_id == SWITCH_EVENT_PRESENCE_IN ? "IN" : "OUT", profile->name); event->event_id == SWITCH_EVENT_PRESENCE_IN ? "IN" : "OUT", profile->name);
} }
switch_safe_free(sql);
if (!zstr((char *) helper.stream.data)) { if (!zstr((char *) helper.stream.data)) {
char *this_sql = (char *) helper.stream.data; char *this_sql = (char *) helper.stream.data;
char *next = NULL; char *next = NULL;