If the mod_sofia global presense hash is null, then make sure to free the matches variable before going to done.

This commit is contained in:
William King 2013-05-18 16:05:40 -07:00
parent dac6ce1b45
commit d61d395e8d

View File

@ -1071,7 +1071,7 @@ static switch_event_t *actual_sofia_presence_event_handler(switch_event_t *event
char *presence_source = switch_event_get_header(event, "presence-source"); char *presence_source = switch_event_get_header(event, "presence-source");
char *call_info_state = switch_event_get_header(event, "presence-call-info-state"); char *call_info_state = switch_event_get_header(event, "presence-call-info-state");
const char *uuid = switch_event_get_header(event, "unique-id"); const char *uuid = switch_event_get_header(event, "unique-id");
switch_console_callback_match_t *matches; switch_console_callback_match_t *matches = NULL;
struct presence_helper helper = { 0 }; struct presence_helper helper = { 0 };
int hup = 0; int hup = 0;
switch_event_t *s_event = NULL; switch_event_t *s_event = NULL;
@ -1118,6 +1118,7 @@ static switch_event_t *actual_sofia_presence_event_handler(switch_event_t *event
if (!mod_sofia_globals.profile_hash) { if (!mod_sofia_globals.profile_hash) {
switch_console_free_matches(&matches);
goto done; goto done;
} }