You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by mi...@apache.org on 2008/05/27 06:45:46 UTC

svn commit: r660372 - /webservices/axis2/trunk/c/axiom/src/om/om_text.c

Author: milinda
Date: Mon May 26 21:45:42 2008
New Revision: 660372

URL: http://svn.apache.org/viewvc?rev=660372&view=rev
Log:
Fixing memory leak in serialize_start_part logic.

Modified:
    webservices/axis2/trunk/c/axiom/src/om/om_text.c

Modified: webservices/axis2/trunk/c/axiom/src/om/om_text.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_text.c?rev=660372&r1=660371&r2=660372&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_text.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_text.c Mon May 26 21:45:42 2008
@@ -92,8 +92,6 @@
     om_text->data_handler = NULL;
     om_text->mime_type = NULL;
 
-    om_text->ns = NULL;
-
     if (value)
     {
         om_text->value = axutil_string_create(env, value);
@@ -434,6 +432,8 @@
     if (om_text->ns)
     {
         axiom_namespace_serialize(om_text->ns, env, om_output);
+		axiom_namespace_free(om_text->ns, env);
+		om_text->ns = NULL;
     }
 
     return AXIS2_SUCCESS;
@@ -604,8 +604,6 @@
     om_text->data_handler = NULL;
     om_text->mime_type = NULL;
 
-    om_text->ns = NULL;
-
     if (value)
     {
         om_text->value = axutil_string_clone(value, env);