diff --git a/ports/unix/main.c b/ports/unix/main.c index b065706ba6..47973df8df 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -296,10 +296,10 @@ STATIC int do_repl(void) { } int ret = execute_from_lexer(LEX_SRC_STR, line, MP_PARSE_SINGLE_INPUT, true); + free(line); if (ret & FORCED_EXIT) { return ret; } - free(line); } #endif