]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Needs to be alloced in hp not ctx
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 19 Aug 2021 00:44:33 +0000 (19:44 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 19 Aug 2021 00:44:33 +0000 (19:44 -0500)
src/lib/util/heap.c

index 9665c092857146331413819ca0876f57ec1bf1c0..2ddc847816aa2cf9e6dfb90d37894f3658b02e7a 100644 (file)
@@ -91,7 +91,7 @@ fr_heap_t *_fr_heap_alloc(TALLOC_CTX *ctx, fr_heap_cmp_t cmp, char const *type,
         *      a 100% performance increase
         *      (talloc headers are big);
         */
-       h = (heap_t *)talloc_array(ctx, uint8_t, sizeof(heap_t) + (sizeof(void *) * (init + 1)));
+       h = (heap_t *)talloc_array(hp, uint8_t, sizeof(heap_t) + (sizeof(void *) * (init + 1)));
        if (unlikely(!h)) return NULL;
        talloc_set_type(h, heap_t);