]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use xmlMemSetup() instead of xmlGcMemSetup()
authorOndřej Surý <ondrej@isc.org>
Wed, 17 Apr 2024 17:58:16 +0000 (19:58 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 18 Apr 2024 08:53:31 +0000 (10:53 +0200)
Since we don't have a specialized function for "atomic" allocations,
it's better to just use xmlMemSetup() instead of xmlGcMemSetup()
according to this:

https://mail.gnome.org/archives/xml/2007-August/msg00032.html

lib/isc/xml.c

index 9b5e52c81861a624b6478c9eb54dfcdf2b17421b..bfea645ea55fbaf73aab85e6c279960e6b215019 100644 (file)
@@ -53,9 +53,8 @@ isc__xml_initialize(void) {
        isc_mem_setname(isc__xml_mctx, "libxml2");
        isc_mem_setdestroycheck(isc__xml_mctx, false);
 
-       RUNTIME_CHECK(xmlGcMemSetup(isc__xml_free, isc__xml_malloc,
-                                   isc__xml_malloc, isc__xml_realloc,
-                                   isc__xml_strdup) == 0);
+       RUNTIME_CHECK(xmlMemSetup(isc__xml_free, isc__xml_malloc,
+                                 isc__xml_realloc, isc__xml_strdup) == 0);
 
        xmlInitParser();
 #endif /* HAVE_LIBXML2 */