diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2020-09-18 19:15:27 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2020-09-18 19:15:27 +0200 |
commit | 8b88503a2762edcc14d958f4a80149baffe95be7 (patch) | |
tree | 4b4649ba561b04668915b05d6a6488738b054893 /xpath.c | |
parent | b215c270fa3b1436314cc56654718bd12182cfec (diff) | |
download | libxml2-8b88503a2762edcc14d958f4a80149baffe95be7.tar.gz |
Don't call xmlXPathInit directly
Call xmlInitParser which uses a lock to avoid race conditions.
Fixes #184.
Diffstat (limited to 'xpath.c')
-rw-r--r-- | xpath.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14234,7 +14234,7 @@ xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { return(comp); #endif - xmlXPathInit(); + xmlInitParser(); pctxt = xmlXPathNewParserContext(str, ctxt); if (pctxt == NULL) @@ -14323,7 +14323,7 @@ xmlXPathCompiledEvalInternal(xmlXPathCompExprPtr comp, if (comp == NULL) return(-1); - xmlXPathInit(); + xmlInitParser(); #ifndef LIBXML_THREAD_ENABLED reentance++; @@ -14468,7 +14468,7 @@ xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) { CHECK_CTXT(ctx) - xmlXPathInit(); + xmlInitParser(); ctxt = xmlXPathNewParserContext(str, ctx); if (ctxt == NULL) |