From a74098d2d48967e97c1687f270e38e27ae0cbfcb Mon Sep 17 00:00:00 2001 From: Water-Melon Date: Fri, 9 Feb 2024 11:00:04 +0000 Subject: [PATCH] fix(alloc): fix segment fault caused by uninitialized memory block --- src/mln_alloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mln_alloc.c b/src/mln_alloc.c index dda20563..88200e93 100644 --- a/src/mln_alloc.c +++ b/src/mln_alloc.c @@ -325,6 +325,7 @@ MLN_FUNC(, void *, mln_alloc_m, (mln_alloc_t *pool, mln_size_t size), (pool, siz ch->blks[n] = blk; ptr += size; } + ch->blks[n] = NULL; } out: