You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by mi...@apache.org on 2008/04/16 11:32:28 UTC

svn commit: r648643 - /webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c

Author: milinda
Date: Wed Apr 16 02:32:27 2008
New Revision: 648643

URL: http://svn.apache.org/viewvc?rev=648643&view=rev
Log:
Fixed guththila memory leak.

Modified:
    webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c

Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c?rev=648643&r1=648642&r2=648643&view=diff
==============================================================================
--- webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c (original)
+++ webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c Wed Apr 16 02:32:27 2008
@@ -1158,10 +1158,6 @@
     size_t elem_len = 0;
     guththila_xml_writer_namesp_t * writer_namesp = NULL;
 
-    namesp =
-        (guththila_xml_writer_namesp_t *) AXIS2_MALLOC(env->allocator,
-                                                   sizeof
-                                                   (guththila_xml_writer_namesp_t));
     elem =
         (guththila_xml_writer_element_t *) AXIS2_MALLOC(env->allocator,
                                                     sizeof
@@ -1193,7 +1189,7 @@
             }
         }
     }
-    if (namesp && elem)
+    if (elem)
     {
         elem->name_sp_stack_no = -1;
         if (wr->status == START)
@@ -1264,6 +1260,10 @@
         }
         if (!nmsp_found)
         {
+	    namesp =
+        	(guththila_xml_writer_namesp_t *) AXIS2_MALLOC(env->allocator,
+                                                   sizeof
+                                                   (guththila_xml_writer_namesp_t));	
             
 #ifndef GUTHTHILA_XML_WRITER_TOKEN
             namesp->name =



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