1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-28 07:21:26 +03:00

parser: Register atexit handler in locked section

This commit is contained in:
Nick Wellnhofer 2022-11-25 13:55:39 +01:00
parent 71931233cd
commit 78c0391bc7

View File

@ -14487,15 +14487,15 @@ xmlInitParser(void) {
if (xmlParserInitialized != 0)
return;
#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
if (xmlFree == free)
atexit(xmlCleanupParser);
#endif
#ifdef LIBXML_THREAD_ENABLED
__xmlGlobalInitMutexLock();
if (xmlParserInitialized == 0) {
#endif
#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
if (xmlFree == free)
atexit(xmlCleanupParser);
#endif
xmlInitThreadsInternal();
xmlInitGlobalsInternal();
xmlInitMemoryInternal();