[Lxml-checkins] r33265 - in lxml/trunk: . src/lxml
scoder at codespeak.net
scoder at codespeak.net
Fri Oct 13 17:48:35 CEST 2006
Author: scoder
Date: Fri Oct 13 17:48:32 2006
New Revision: 33265
Modified:
lxml/trunk/CHANGES.txt
lxml/trunk/src/lxml/xslt.pxi
Log:
memory leak for external URLs in _XSLTProcessingInstruction.parseXSL()
Modified: lxml/trunk/CHANGES.txt
==============================================================================
--- lxml/trunk/CHANGES.txt (original)
+++ lxml/trunk/CHANGES.txt Fri Oct 13 17:48:32 2006
@@ -15,6 +15,8 @@
Bugs fixed
----------
+* Memory leak for external URLs in _XSLTProcessingInstruction.parseXSL()
+
* Memory leak when garbage collecting tailed root elements
* HTML script/style content was not propagated to .text
Modified: lxml/trunk/src/lxml/xslt.pxi
==============================================================================
--- lxml/trunk/src/lxml/xslt.pxi (original)
+++ lxml/trunk/src/lxml/xslt.pxi Fri Oct 13 17:48:32 2006
@@ -582,9 +582,12 @@
c_href = tree.xmlBuildURI(
c_href,
tree.xmlNodeGetBase(self._c_node.doc, self._c_node))
- if c_href is NULL:
- c_href = _cstr(href_utf)
- result_doc = _parseDocument(funicode(c_href), parser)
+ if c_href is not NULL:
+ href = funicode(c_href)
+ tree.xmlFree(c_href)
+ else:
+ href = funicode(_cstr(href_utf))
+ result_doc = _parseDocument(href, parser)
return _elementTreeFactory(result_doc, None)
# ID reference to embedded stylesheet
More information about the lxml-checkins
mailing list