From c76d9ec5f7a1c5870a696ed0cc2842ce20a37cb3 Mon Sep 17 00:00:00 2001 From: Chris Sadler Date: Wed, 2 Feb 2022 16:24:20 -0800 Subject: [PATCH] Try zeroing alloc_size instead of sizeof(*new_block) --- ionc/ion_allocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionc/ion_allocation.c b/ionc/ion_allocation.c index af10781..f28db06 100644 --- a/ionc/ion_allocation.c +++ b/ionc/ion_allocation.c @@ -179,7 +179,7 @@ ION_ALLOCATION_CHAIN *_ion_alloc_block(SIZE min_needed) SIZE alloc_size = min_needed + ALIGN_SIZE(sizeof(ION_ALLOCATION_CHAIN)); // subtract out the block[1] new_block = (ION_ALLOCATION_CHAIN *)ion_xalloc(alloc_size); - memset(new_block, 0, sizeof(*new_block)); + memset(new_block, 0, alloc_size); new_block->size = alloc_size; // see if we suceeded