diff options
| author | scoder <none@none> | 2009-02-17 22:23:22 +0100 |
|---|---|---|
| committer | scoder <none@none> | 2009-02-17 22:23:22 +0100 |
| commit | 59cabd2afa97c17514ba4378d9a93f748c9abbac (patch) | |
| tree | bc920951f3469f7797062538f6ff6b6860682dca | |
| parent | eb5b1b547bc6c50dce36ee9f204588f79153d1a4 (diff) | |
| download | python-lxml-59cabd2afa97c17514ba4378d9a93f748c9abbac.tar.gz | |
[svn r4097] r5019@delle: sbehnel | 2009-02-17 22:20:40 +0100
fix memory leak in XPath evaluators
--HG--
branch : trunk
| -rw-r--r-- | src/lxml/xpath.pxi | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lxml/xpath.pxi b/src/lxml/xpath.pxi index c1591fb8..8be3fe4c 100644 --- a/src/lxml/xpath.pxi +++ b/src/lxml/xpath.pxi @@ -128,6 +128,9 @@ cdef class _XPathEvaluatorBase: def __dealloc__(self): if self._xpathCtxt is not NULL: xpath.xmlXPathFreeContext(self._xpathCtxt) + if config.ENABLE_THREADING: + if self._eval_lock is not NULL: + python.PyThread_free_lock(self._eval_lock) cdef set_context(self, xpath.xmlXPathContext* xpathCtxt): self._xpathCtxt = xpathCtxt |
