[Freeswitch-svn] [commit] r10785 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Mon Dec 15 13:13:03 PST 2008


Author: mikej
Date: Mon Dec 15 16:13:03 2008
New Revision: 10785

Log:
little leak

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	Mon Dec 15 16:13:03 2008
@@ -441,10 +441,10 @@
 	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 @@
 				switch_safe_free(sql);
 			}
 
-			switch_safe_free(user);
 			switch_safe_free(probe_user);
 		}
-		return;
+		goto done;
 	default:
 		break;
 	}



More information about the Freeswitch-svn mailing list