Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The struct member right_red is used in several functions, such as rb_node_set_right(). It has been reported by infer and LLVM static analyzer that right_red isn't initialized before used. By tracing the node initialization function calls (starting from map_create_node), it can be seen that rb_node_set_right is the function where right_red is attempted to be initialized, but we are indeed performing &1 on an uninitialized value. In this commit, a change to using calloc guarantees the struct members will be zeroed out during allocation, which in terms serves as initialization.
- Loading branch information