1 parent 39763c6 commit 2b2cb7bCopy full SHA for 2b2cb7b
1 file changed
unix/main.c
@@ -112,7 +112,7 @@ static char *prompt(char *p) {
112
} else {
113
l++;
114
}
115
- char *line = m_new(char, l);
+ char *line = malloc(l);
116
memcpy(line, buf, l);
117
#endif
118
return line;
@@ -140,6 +140,7 @@ static void do_repl(void) {
140
141
mp_lexer_t *lex = mp_lexer_new_from_str_len("<stdin>", line, strlen(line), false);
142
execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, true);
143
+ free(line);
144
145
146
0 commit comments