[ expat-Bugs-596931 ] XML_ParseReset and memory leaks

noreply@sourceforge.net noreply@sourceforge.net
Sun Aug 18 17:26:01 2002


Bugs item #596931, was opened at 2002-08-18 17:25
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=596931&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: XML_ParseReset and memory leaks

Initial Comment:
The problem:
XML_ParseReset function does not reset the parser 
correctly, resulting in memory leaks. These leaks can 
be observed using the windows task manager while 
running the sample code below.  

Expat version: 1.95.4
Platform: win200

Sample Application:

include <string.h>
#include "expat.h"

char buffer[] = "<?xml version=\1.0\?><request 
version=\1.00\></request>";

void main()
{
   XML_Parser parser = XML_ParserCreate(NULL);

   while ( true )
   {
      int ret = XML_Parse( parser, buffer, strlen(buffer ), 1);
      if( ret == 0 )
      {
         abort();
      }

      ret = XML_ParserReset( parser, NULL );
      if( ret == 0 )
      {
         abort();
      }
   }
}


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=596931&group_id=10127