unix main: Free input line.
Also, readline uses system malloc, so for symmetry, use the same for
non-readline case.
diff --git a/unix/main.c b/unix/main.c
index c936106..681bf2a 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -112,7 +112,7 @@
} else {
l++;
}
- char *line = m_new(char, l);
+ char *line = malloc(l);
memcpy(line, buf, l);
#endif
return line;
@@ -140,6 +140,7 @@
mp_lexer_t *lex = mp_lexer_new_from_str_len("<stdin>", line, strlen(line), false);
execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, true);
+ free(line);
}
}