From: Michael Jerris Date: Mon, 15 Dec 2008 21:13:03 +0000 (+0000) Subject: little leak X-Git-Tag: v1.0.2~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1a20a12d1d3b55547896e571d30865f54893643;p=thirdparty%2Ffreeswitch.git little leak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10785 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 32f6d71d87..8cd1fe0a5c 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -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; }