mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
fix: avoid segfault at exit when using custom memory functions
This extends the fix introduced by 956534e to Windows processes
dynamically loading libxml2.
Closes #256.
This commit is contained in:
3
parser.c
3
parser.c
@@ -14672,7 +14672,8 @@ xmlInitParser(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
||||||
atexit(xmlCleanupParser);
|
if (xmlFree == free)
|
||||||
|
atexit(xmlCleanupParser);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
|
|||||||
Reference in New Issue
Block a user