diff options
author | Mark Stapp <mjs@labn.net> | 2024-01-29 18:56:28 +0100 |
---|---|---|
committer | Mark Stapp <mjs@labn.net> | 2024-01-29 18:56:28 +0100 |
commit | cad880c2df5d55e6d1652c913afd1f96636d0e5f (patch) | |
tree | b7a41b33c3579dc7614d597c4db411366c1c1d65 /lib/bitfield.h | |
parent | Merge pull request #15181 from idryzhov/zebra-mgmtd (diff) | |
download | frr-cad880c2df5d55e6d1652c913afd1f96636d0e5f.tar.xz frr-cad880c2df5d55e6d1652c913afd1f96636d0e5f.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | lib/bitfield.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bitfield.h b/lib/bitfield.h index cc8c31141..3fda627b7 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -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) |