[Mod_transform] Memory leak
Edward Rudd
urkle at outoforder.cc
Mon Jul 16 09:14:49 EDT 2007
I have added this issue to my issue tracker as issue #75.
http://issues.outoforder.cc/view.php?id=75
I will take a look at this as soon as I can.
spinmar at libero.it wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.outoforder.cc/pipermail/mod_transform/attachments/20070716/763d2505/attachment.bin
More information about the Mod_transform
mailing list