Skip to content

Commit

Permalink
Merge pull request #362 from henrybear327/fix/rb_tree_init
Browse files Browse the repository at this point in the history
Fix reading uninitialized variable (#349)
  • Loading branch information
jserv authored Feb 26, 2024
2 parents ac13c78 + af24e0c commit fc3207e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static map_node_t *map_create_node(void *key,
size_t ksize,
size_t vsize)
{
map_node_t *node = malloc(sizeof(map_node_t));
map_node_t *node = calloc(1, sizeof(map_node_t));
assert(node);

/* allocate memory for the keys and data */
Expand Down

0 comments on commit fc3207e

Please sign in to comment.