]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
little leak
authorMichael Jerris <mike@jerris.com>
Mon, 15 Dec 2008 21:13:03 +0000 (21:13 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 15 Dec 2008 21:13:03 +0000 (21:13 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10785 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_presence.c

index 32f6d71d8725edf51bd6845e4da8c0bd94076b2c..8cd1fe0a5cc349890c5c1901207e056647b4b72e 100644 (file)
@@ -441,10 +441,10 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
        case SWITCH_EVENT_PRESENCE_PROBE:
                if (proto) {
                        char *to = switch_event_get_header(event, "to");
-                       char *probe_user, *probe_euser, *probe_host, *p;
+                       char *probe_user = NULL, *probe_euser, *probe_host, *p;
 
                        if (!to || !(probe_user = strdup(to))) {
-                               return;
+                               goto done;
                        }
 
                        if ((probe_host = strchr(probe_user, '@'))) {
@@ -488,10 +488,9 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
                                switch_safe_free(sql);
                        }
 
-                       switch_safe_free(user);
                        switch_safe_free(probe_user);
                }
-               return;
+               goto done;
        default:
                break;
        }