]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
If the mod_sofia global presense hash is null, then make sure to free the matches...
authorWilliam King <william.king@quentustech.com>
Sat, 18 May 2013 23:05:40 +0000 (16:05 -0700)
committerWilliam King <william.king@quentustech.com>
Sat, 18 May 2013 23:06:15 +0000 (16:06 -0700)
src/mod/endpoints/mod_sofia/sofia_presence.c

index c69fc6f35588f0ec082d3cd3512b793b9249cc32..0abe14e0fbb66923527faa5aae042c820760400e 100644 (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 *call_info_state = switch_event_get_header(event, "presence-call-info-state");
        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 };                  
        int hup = 0;
        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) {
+                                                       switch_console_free_matches(&matches);
                                                        goto done;
                                                }