From 02528f647d4d217a574eb2518dbb925c937dded6 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 12 Dec 2023 18:34:14 -0800 Subject: [PATCH] [PRISM] Use xcalloc for iseq id table We use xfree on the other end, so we need to use a form of xmalloc here. Co-authored-by: Matthew Draper --- prism_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prism_compile.c b/prism_compile.c index db4c64ccea5c1d..d744f435069434 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -4663,7 +4663,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret, const VALUE default_values = rb_ary_hidden_new(1); const VALUE complex_mark = rb_str_tmp_new(0); - ID *ids = calloc(keywords_list->size, sizeof(ID)); + ID *ids = xcalloc(keywords_list->size, sizeof(ID)); for (size_t i = 0; i < keywords_list->size; i++, local_index++) { pm_node_t *keyword_parameter_node = keywords_list->nodes[i];