8000 unix/main: Fix memory leakage if MICROPY_USE_READLINE is disabled. · micropython/micropython@1660c78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1660c78

Browse files
versaloondpgeorge
authored andcommitted
unix/main: Fix memory leakage if MICROPY_USE_READLINE is disabled.
1 parent 4e5611c commit 1660c78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/unix/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ STATIC int do_repl(void) {
296296
}
297297

298298
int ret = execute_from_lexer(LEX_SRC_STR, line, MP_PARSE_SINGLE_INPUT, true);
299+
free(line);
299300
if (ret & FORCED_EXIT) {
300301
return ret;
301302
}
302-
free(line);
303303
}
304304

305305
#endif

0 commit comments

Comments
 (0)
0