axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r344878 - /webservices/axis2/trunk/c/modules/util/src/qname.c
Date Wed, 16 Nov 2005 04:26:33 GMT
Author: samisa
Date: Tue Nov 15 20:26:27 2005
New Revision: 344878

URL: http://svn.apache.org/viewcvs?rev=344878&view=rev
Log:
error fixed 
-This line, and those below, will be ignored--

M    qname.c

Modified:
    webservices/axis2/trunk/c/modules/util/src/qname.c

Modified: webservices/axis2/trunk/c/modules/util/src/qname.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/qname.c?rev=344878&r1=344877&r2=344878&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/qname.c (original)
+++ webservices/axis2/trunk/c/modules/util/src/qname.c Tue Nov 15 20:26:27 2005
@@ -316,7 +316,11 @@
         AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
+    if(AXIS2_INTF_TO_IMPL(qname)->namespace_uri)
+        AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(qname)->namespace_uri);
     AXIS2_INTF_TO_IMPL(qname)->namespace_uri = (axis2_char_t*)AXIS2_STRDUP(uri, env);
+    if(!AXIS2_INTF_TO_IMPL(qname)->namespace_uri)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
     return AXIS2_SUCCESS;
 }
 
@@ -333,7 +337,12 @@
         AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
+    if(AXIS2_INTF_TO_IMPL(qname)->prefix)
+        AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(qname)->prefix);
+    
     AXIS2_INTF_TO_IMPL(qname)->prefix = (axis2_char_t*)AXIS2_STRDUP(prefix, env);
+    if(!AXIS2_INTF_TO_IMPL(qname)->prefix)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
     return AXIS2_SUCCESS;
 }
 
@@ -349,6 +358,10 @@
         AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
+    if(AXIS2_INTF_TO_IMPL(qname)->localpart)
+        AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(qname)->localpart);
     AXIS2_INTF_TO_IMPL(qname)->localpart = (axis2_char_t*)AXIS2_STRDUP(localpart, env);
+    if(!AXIS2_INTF_TO_IMPL(qname)->localpart)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
     return AXIS2_SUCCESS;
 }



Mime
View raw message