Skip to content

Commit

Permalink
lib: init new bitfield word after realloc
Browse files Browse the repository at this point in the history
Realloc doesn't init - ensure a newly-allocated word is inited.

Signed-off-by: Mark Stapp <[email protected]>
  • Loading branch information
Mark Stapp committed Jan 29, 2024
1 parent f8755d7 commit cad880c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/bitfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ DECLARE_MTYPE(BITFIELD);
(v).m = (v).m + 1; \
(v).data = XREALLOC(MTYPE_BITFIELD, (v).data, \
(v).m * sizeof(word_t)); \
(v).data[(v).m - 1] = 0; \
} \
} while (0)

Expand Down

0 comments on commit cad880c

Please sign in to comment.