[Expat-bugs] [ expat-Bugs-676926 ] memory leak in xmlparse.c::doProlog()

SourceForge.net noreply at sourceforge.net
Wed Jan 29 09:57:38 EST 2003


Bugs item #676926, was opened at 2003-01-29 12:57
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=676926&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Nobody/Anonymous (nobody)
Summary: memory leak in xmlparse.c::doProlog()

Initial Comment:
As of now, 2003/1/29, there is a memory leak in
xmlparse.c::doProlog() line 3979.

The XML_Content is dynamically allocated, but never
freed in the block.  The lifetime of the variable
content is not clear.  It is passed to
elementDeclHandler().  Does content need to be dynamic,
or can it be a local (stack) variable?  Does
elementDeclHandler() take ownership of content?

I can make the change in Python (which is where this
problem was found from test_minidom).

20 bytes in 1 blocks are definitely lost in loss record
2 of 15
  at 0x4015D480: malloc (vg_clientfuncs.c:100)
doProlog (python/dist/src/Modules/expat/xmlparse.c:3979)
prologProcessor
(python/dist/src/Modules/expat/xmlparse.c:3185)
prologInitProcessor
(python/dist/src/Modules/expat/xmlparse.c:3016)
XML_ParseBuffer
(python/dist/src/Modules/expat/xmlparse.c:1439)
XML_Parse (python/dist/src/Modules/expat/xmlparse.c:1427)
xmlparse_Parse (python/dist/src/Modules/pyexpat.c:853)


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

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



More information about the Expat-bugs mailing list