summaryrefslogtreecommitdiffstatshomepage
path: root/py/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/parse.c')
-rw-r--r--py/parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/py/parse.c b/py/parse.c
index 5920828fe9..397d46d9f0 100644
--- a/py/parse.c
+++ b/py/parse.c
@@ -1010,9 +1010,10 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) {
// truncate final chunk and link into chain of chunks
if (parser.cur_chunk != NULL) {
- (void)m_renew(byte, parser.cur_chunk,
+ (void)m_renew_maybe(byte, parser.cur_chunk,
sizeof(mp_parse_chunk_t) + parser.cur_chunk->alloc,
- sizeof(mp_parse_chunk_t) + parser.cur_chunk->union_.used);
+ sizeof(mp_parse_chunk_t) + parser.cur_chunk->union_.used,
+ false);
parser.cur_chunk->alloc = parser.cur_chunk->union_.used;
parser.cur_chunk->union_.next = parser.tree.chunk;
parser.tree.chunk = parser.cur_chunk;