From 54f8e6fbbcdbe3162e39b5053b0ebbf872fc2d77 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Wed, 11 Dec 2024 15:23:25 -0800 Subject: [PATCH] Use malloc for prism string source Prism will later free this string via free rather than xfree, so we need to use malloc rather than xmalloc. Co-authored-by: Aaron Patterson 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 9b1f65e015..eff152bce7 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10840,7 +10840,7 @@ pm_read_file(pm_string_t *string, const char *filepath) } size_t length = (size_t) len; - uint8_t *source = xmalloc(length); + uint8_t *source = malloc(length); memcpy(source, RSTRING_PTR(contents), length); *string = (pm_string_t) { .type = PM_STRING_OWNED, .source = source, .length = length };