Skip to content

Commit

Permalink
Try zeroing alloc_size instead of sizeof(*new_block)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadderchris committed Feb 3, 2022
1 parent cf5efba commit c76d9ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ionc/ion_allocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c76d9ec

Please sign in to comment.