Skip to content

Commit

Permalink
Try zeroing memory after we allocate it
Browse files Browse the repository at this point in the history
  • Loading branch information
sadderchris committed Feb 3, 2022
1 parent bcfcbd2 commit cf5efba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ionc/ion_allocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +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));
new_block->size = alloc_size;

// see if we suceeded
Expand Down

0 comments on commit cf5efba

Please sign in to comment.