fix that cxPropertiesLoad() is not falling back to the default allocator when the allocator is NULL

Tue, 09 Dec 2025 18:51:11 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 09 Dec 2025 18:51:11 +0100
changeset 1559
9e50f45f8736
parent 1558
fc863c877a75
child 1560
f060ecd65575

fix that cxPropertiesLoad() is not falling back to the default allocator when the allocator is NULL

src/properties.c file | annotate | diff | comparison | revisions
--- a/src/properties.c	Tue Dec 09 17:27:58 2025 +0100
+++ b/src/properties.c	Tue Dec 09 18:51:11 2025 +0100
@@ -254,6 +254,10 @@
 
 CxPropertiesStatus cx_properties_load(CxPropertiesConfig config,
         const CxAllocator *allocator, cxstring filename, CxMap *target) {
+    if (allocator == NULL) {
+        allocator = cxDefaultAllocator;
+    }
+
     // sanity check for the map
     const bool use_cstring = cxCollectionStoresPointers(target);
     if (!use_cstring && cxCollectionElementSize(target) != sizeof(cxmutstr)) {

mercurial