1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Don't call xmlXPathInit directly

Call xmlInitParser which uses a lock to avoid race conditions.

Fixes #184.
This commit is contained in:
Nick Wellnhofer
2020-09-18 19:15:27 +02:00
parent b215c270fa
commit 8b88503a27
2 changed files with 4 additions and 4 deletions

View File

@@ -1352,7 +1352,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
xmlXPathObjectPtr init = NULL;
int stack = 0;
xmlXPathInit();
xmlInitParser();
if ((ctx == NULL) || (str == NULL))
return(NULL);