diff options
author | Peter Zhu <[email protected]> | 2024-07-22 13:23:44 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-07-22 14:22:47 -0400 |
commit | ec6f40e8f1f81fa97e2a7d7c1a7aa0a3cb8ce827 (patch) | |
tree | eebe43abbe427c97a63af3299da1f97268484b2b | |
parent | 5299672a5bb52904cc6b9555be704af2cdc18eba (diff) |
[PRISM] Use xcalloc for constants instead of calloc
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11222
-rw-r--r-- | prism_compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prism_compile.c b/prism_compile.c index 713635f033..1d955712d8 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10289,7 +10289,7 @@ pm_parse_process(pm_parse_result_t *result, pm_node_t *node) // Now set up the constant pool and intern all of the various constants into // their corresponding IDs. scope_node->parser = parser; - scope_node->constants = calloc(parser->constant_pool.size, sizeof(ID)); + scope_node->constants = xcalloc(parser->constant_pool.size, sizeof(ID)); for (uint32_t index = 0; index < parser->constant_pool.size; index++) { pm_constant_t *constant = &parser->constant_pool.constants[index]; |