axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r633056 - /webservices/axis2/trunk/c/util/src/uri.c
Date Mon, 03 Mar 2008 12:10:11 GMT
Author: senaka
Date: Mon Mar  3 04:10:09 2008
New Revision: 633056

URL: http://svn.apache.org/viewvc?rev=633056&view=rev
Log:
Fixing JIRA Issue AXIS2C-1017

Modified:
    webservices/axis2/trunk/c/util/src/uri.c

Modified: webservices/axis2/trunk/c/util/src/uri.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/uri.c?rev=633056&r1=633055&r2=633056&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/uri.c (original)
+++ webservices/axis2/trunk/c/util/src/uri.c Mon Mar  3 04:10:09 2008
@@ -509,7 +509,10 @@
     AXIS2_PARAM_CHECK(env->error, hostinfo, NULL);
 
     uri = (axutil_uri_t *) axutil_uri_create(env);
-
+    if (!uri)
+    {
+        return NULL;
+    }
     /* Initialize the structure. parse_uri() and parse_uri_components()
      * can be called more than once per request.
      */
@@ -525,6 +528,7 @@
         rsb = strchr(hostinfo, ']');
         if (!rsb || *(rsb + 1) != ':')
         {
+            axutil_uri_free(uri, env);
             return NULL;
         }
         /* literal IPv6 address */
@@ -538,6 +542,7 @@
     }
     if (!s)
     {
+        axutil_uri_free(uri, env);
         return NULL;
     }
     uri->hostname = axutil_strndup(env, hostinfo, (int)(s - hostinfo - v6_offset1));
@@ -553,6 +558,7 @@
         }
         /* Invalid characters after ':' found */
     }
+    axutil_uri_free(uri, env);
     return NULL;
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message