File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed 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) {
4253
4253
const uint8_t *point = memchr(start, '.', length);
4254
4254
assert(point && "should have a decimal point");
4255
4255
4256
- uint8_t *digits = malloc (length);
4256
+ uint8_t *digits = xmalloc (length);
4257
4257
if (digits == NULL) {
4258
4258
fputs("[pm_float_node_rational_create] Failed to allocate memory", stderr);
4259
4259
abort();
@@ -4266,7 +4266,7 @@ pm_float_node_rational_create(pm_parser_t *parser, const pm_token_t *token) {
4266
4266
digits[0] = '1';
4267
4267
if (end - point > 1) memset(digits + 1, '0', (size_t) (end - point - 1));
4268
4268
pm_integer_parse(&node->denominator, PM_INTEGER_BASE_DEFAULT, digits, digits + (end - point));
4269
- free (digits);
4269
+ xfree (digits);
4270
4270
4271
4271
pm_integers_reduce(&node->numerator, &node->denominator);
4272
4272
return node;
You can’t perform that action at this time.
0 commit comments