summaryrefslogtreecommitdiffstatshomepage
path: root/py/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/parse.c')
-rw-r--r--py/parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/parse.c b/py/parse.c
index bbe5b038a6..d1f29139a2 100644
--- a/py/parse.c
+++ b/py/parse.c
@@ -166,8 +166,8 @@ STATIC void *parser_alloc(parser_t *parser, size_t num_bytes) {
sizeof(mp_parse_chunk_t) + chunk->alloc + num_bytes, false);
if (new_data == NULL) {
// could not grow existing memory; shrink it to fit previous
- (void)m_renew(byte, chunk, sizeof(mp_parse_chunk_t) + chunk->alloc,
- sizeof(mp_parse_chunk_t) + chunk->union_.used);
+ (void)m_renew_maybe(byte, chunk, sizeof(mp_parse_chunk_t) + chunk->alloc,
+ sizeof(mp_parse_chunk_t) + chunk->union_.used, false);
chunk->alloc = chunk->union_.used;
chunk->union_.next = parser->tree.chunk;
parser->tree.chunk = chunk;