File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4253,7 +4253,7 @@ pm_float_node_rational_create(pm_parser_t *parser, const pm_token_t *token) {
42534253 const uint8_t *point = memchr(start, '.', length);
42544254 assert(point && "should have a decimal point");
42554255
4256- uint8_t *digits = malloc (length);
4256+ uint8_t *digits = xmalloc (length);
42574257 if (digits == NULL) {
42584258 fputs("[pm_float_node_rational_create] Failed to allocate memory", stderr);
42594259 abort();
@@ -4266,7 +4266,7 @@ pm_float_node_rational_create(pm_parser_t *parser, const pm_token_t *token) {
42664266 digits[0] = '1';
42674267 if (end - point > 1) memset(digits + 1, '0', (size_t) (end - point - 1));
42684268 pm_integer_parse(&node->denominator, PM_INTEGER_BASE_DEFAULT, digits, digits + (end - point));
4269- free (digits);
4269+ xfree (digits);
42704270
42714271 pm_integers_reduce(&node->numerator, &node->denominator);
42724272 return node;
You can’t perform that action at this time.
0 commit comments