[Issues] [mod_transform 0000075]: Possible Memory Leak
issues at outoforder.cc
issues at outoforder.cc
Mon Jul 16 08:59:07 EDT 2007
The following issue has been SUBMITTED.
======================================================================
http://issues.outoforder.cc/view.php?id=75
======================================================================
Reported By: urkle
Assigned To:
======================================================================
Project: mod_transform
Issue ID: 75
Category: Other
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
Apache Version: unspecified
======================================================================
Date Submitted: 07-16-2007 08:59 EDT
Last Modified: 07-16-2007 08:59 EDT
======================================================================
Summary: Possible Memory Leak
Description:
There is something I don't understand related a possible memory leak.
In mod_transform.c, line 218:
if (APR_BUCKET_IS_EOS(b)) {
if (ctxt) { /* done reading the file. run the transform now */
xmlParseChunk(ctxt, buf, 0, 1);
ret = transform_run(f, ctxt->myDoc);
xmlFreeParserCtxt(ctxt);
}
}
where the transform is done.
Reading the documentation about xmlFreeParserCtxt() from xmlsoft.org:
"Free all the memory used by a parser context. However the parsed document
in ctxt->myDoc is not freed."
So ctxt->myDoc is not freedand in mod_transform I can't find where
ctxt->myDoc is freed.
In my opinion it should be:
if (APR_BUCKET_IS_EOS(b)) {
if (ctxt) { /* done reading the file. run the transform now */
xmlParseChunk(ctxt, buf, 0, 1);
ret = transform_run(f, ctxt->myDoc);
xmlFreeDoc(ctxt->myDoc);
xmlFreeParserCtxt(ctxt);
}
}
Am I rigth or not?
Best regards
Marco
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
07-16-07 08:59 urkle New Issue
07-16-07 08:59 urkle Apache Version => unspecified
======================================================================
More information about the Issues
mailing list