diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2022-08-14 01:37:45 +0400 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2022-08-14 01:37:45 +0400 |
commit | c3d3fe77815578949bd82e54ad6c2ce31bbd88e3 (patch) | |
tree | 1ef9399d28e0309fe8d30c0fe40e02aff06ec657 /src | |
parent | 2791d41bb3fef7f07fb9d49088db64e80e7dd8f8 (diff) | |
download | librcc-c3d3fe77815578949bd82e54ad6c2ce31bbd88e3.tar.gz librcc-c3d3fe77815578949bd82e54ad6c2ce31bbd88e3.tar.bz2 librcc-c3d3fe77815578949bd82e54ad6c2ce31bbd88e3.tar.xz librcc-c3d3fe77815578949bd82e54ad6c2ce31bbd88e3.zip |
Fix LibXML2 initalization/cleanup as requested by LibXML2 developers in github issue (fixes #1155330295)
Diffstat (limited to 'src')
-rw-r--r-- | src/librcc.c | 4 | ||||
-rw-r--r-- | src/rccxml.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librcc.c b/src/librcc.c index 97725ec..41a49c8 100644 --- a/src/librcc.c +++ b/src/librcc.c @@ -138,7 +138,9 @@ void rccFree(void) { } rccEngineFree(); - rccXmlFree(); + // Clean-up might cause problems if LibXML2 is also used by an application outside of LibXML2... + // According to LibXML2 developers, usage of this function is not advised, cleanup only should be performed on application exit, and is done libxml2 automatically. + //rccXmlFree(); rccTranslateFree(); rccPluginFree(); diff --git a/src/rccxml.c b/src/rccxml.c index a864b36..82c3cd3 100644 --- a/src/rccxml.c +++ b/src/rccxml.c @@ -89,7 +89,6 @@ int rccXmlInit(int LoadConfiguration) { rcc_engine *engine; xmlInitParser(); - xmlInitCharEncodingHandlers(); xmlKeepBlanksDefault(0); if (LoadConfiguration) { @@ -243,7 +242,6 @@ void rccXmlFree() { xmlctx = NULL; } - xmlCleanupCharEncodingHandlers(); xmlCleanupParser(); } |