1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-04-24 18:50:07 +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:
Mike Dalessio 2021-05-20 13:38:54 -04:00
parent b48e77cf4f
commit a7b9f3ebdf
No known key found for this signature in database
GPG Key ID: 59D3039C71577DD7

View File

@ -14672,7 +14672,8 @@ xmlInitParser(void) {
return;
#if defined(_WIN32) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
atexit(xmlCleanupParser);
if (xmlFree == free)
atexit(xmlCleanupParser);
#endif
#ifdef LIBXML_THREAD_ENABLED