[xml] stylesheet imports and memory management



I've got a problem with the memory management of libxslt with some
python code.


I've got xslts in python doing imports through a (python) loader
function.

The loader function uses either:

   parserContext.ctxReadFile

or:

  transformContext.ctxReadFile

to read in the resource for the import.

My loader function implementation records the relevant document
objects so they can be freed later. This is my understanding of what
the function has to do.

Later on, after the result of the transformation has been finished
with, I free the documents that were created by the XSLT imports.

Directly afterwards I free the stylesheet and I get a glibc double
free error.

It looks like libxslt is trying to free any documents is has got from
the loader function implementation.


Is this correct? It seems to run contrary to the documentation.

-- 
Nic Ferrier
http://www.tapsellferrier.co.uk   for all your tapsell ferrier needs



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]