[Freeswitch-svn] [commit] r13330 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nta

FreeSWITCH SVN mikej at freeswitch.org
Fri May 15 09:00:18 PDT 2009


Author: mikej
Date: Fri May 15 11:00:17 2009
New Revision: 13330

Log:
Tue May 12 13:17:07 CDT 2009  Pekka Pessi <first.last at nokia.com>
  * nta.c: check input in nta_leg_by_uri()
  Ignore-this: f149ac04b5e1bf078c3b00e837738301
  
  Coverity issue.


Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Fri May 15 11:00:17 2009
@@ -1 +1 @@
-Fri May 15 10:58:24 CDT 2009
+Fri May 15 10:59:42 CDT 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Fri May 15 11:00:17 2009
@@ -4899,7 +4899,7 @@
 nta_leg_t *nta_leg_by_uri(nta_agent_t const *agent, url_string_t const *us)
 {
   url_t *url;
-  nta_leg_t *leg;
+  nta_leg_t *leg = NULL;
 
   if (!agent)
     return NULL;
@@ -4909,11 +4909,11 @@
 
   url = url_hdup(NULL, us->us_url);
 
-  agent_aliases(agent, url, NULL);
-
-  leg = url ? dst_find(agent, url, NULL) : NULL;
-
-  su_free(NULL, url);
+  if (url) {
+    agent_aliases(agent, url, NULL);
+    leg = dst_find(agent, url, NULL);
+    su_free(NULL, url);
+  }
 
   return leg;
 }



More information about the Freeswitch-svn mailing list