lib: init new bitfield word after realloc

Realloc doesn't init - ensure a newly-allocated word is inited.

Signed-off-by: Mark Stapp <mjs@labn.net>
This commit is contained in:
Mark Stapp 2024-01-29 12:56:28 -05:00
parent f8755d7f86
commit cad880c2df

View File

@ -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)