src/linked_list.c

changeset 1318
12fa1d37fe48
parent 1316
c41538edfcef
child 1319
aa1f580f8f59
--- a/src/linked_list.c	Thu May 15 15:43:30 2025 +0200
+++ b/src/linked_list.c	Thu May 15 16:02:54 2025 +0200
@@ -401,7 +401,7 @@
 ) {
     void *sbo[CX_LINKED_LIST_SORT_SBO_SIZE];
     void **sorted = length >= CX_LINKED_LIST_SORT_SBO_SIZE ?
-                    malloc(sizeof(void *) * length) : sbo;
+                    cxMalloc(cxDefaultAllocator, sizeof(void *) * length) : sbo;
     if (sorted == NULL) abort();
     void *rc, *lc;
 
@@ -439,7 +439,7 @@
     *begin = sorted[0];
     *end = sorted[length - 1];
     if (sorted != sbo) {
-        free(sorted);
+        cxFree(cxDefaultAllocator, sorted);
     }
 }
 

mercurial