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 sa...@apache.org on 2005/10/25 09:26:52 UTC

svn commit: r328301 - in /webservices/axis2/trunk/c/modules: test/om/src/test_om.c xml/guththila/src/guththila_xml_pull_parser.c

Author: samisa
Date: Tue Oct 25 00:26:44 2005
New Revision: 328301

URL: http://svn.apache.org/viewcvs?rev=328301&view=rev
Log:
More memory leak fixes

Modified:
    webservices/axis2/trunk/c/modules/test/om/src/test_om.c
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c

Modified: webservices/axis2/trunk/c/modules/test/om/src/test_om.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/test_om.c?rev=328301&r1=328300&r2=328301&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/test_om.c (original)
+++ webservices/axis2/trunk/c/modules/test/om/src/test_om.c Tue Oct 25 00:26:44 2005
@@ -89,7 +89,8 @@
     om_output = axis2_om_output_create (environment, NULL, NULL);
     axis2_om_node_serialize (environment, node1, om_output);
 	axis2_free (environment->allocator, om_output);
-    printf ("\n\n");
+    guththila_xml_pull_parser_free (my_guththila_environment, parser);
+	printf ("\n\n");
 }
 
 /*

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c?rev=328301&r1=328300&r2=328301&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c Tue Oct 25 00:26:44 2005
@@ -36,9 +36,12 @@
   parser->attrib = guththila_stack_create (environment);
   parser->namesp = guththila_stack_create (environment);
   parser->dep = guththila_stack_create (environment);
-  parser->name = (guththila_token_t *) guththila_malloc (environment->allocator,sizeof (guththila_token_t));
+  /*parser->name = (guththila_token_t *) guththila_malloc (environment->allocator,sizeof (guththila_token_t));
   parser->prefix = (guththila_token_t *) guththila_malloc (environment->allocator,sizeof (guththila_token_t));
-  parser->value = (guththila_token_t *) guththila_malloc (environment->allocator,sizeof (guththila_token_t));
+  parser->value = (guththila_token_t *) guththila_malloc (environment->allocator,sizeof (guththila_token_t));*/
+  parser->name = NULL;
+  parser->prefix = NULL;
+  parser->value = NULL;
   parser->reader = r;
   parser->_next = 0;
   parser->offset = 0;
@@ -54,7 +57,7 @@
 guththila_xml_pull_parser_free (guththila_environment_t *environment,guththila_xml_pull_parser_t * parser)
 {
   if (parser->buffer)
-    guththila_free (environment->allocator,(void *) parser->buffer);
+    guththila_buffer_free (environment,(void *) parser->buffer);
   if (parser->reader)
     guththila_free (environment->allocator,parser->reader);
   if (parser->stack)