Skip to content
Snippets Groups Projects
Commit 70193b2b authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

unix: Routines related to terminal reading should use system malloc.

Otherwise we have mixup between system and GC alloc.
parent a7752a45
Branches
No related tags found
No related merge requests found
...@@ -97,7 +97,7 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind ...@@ -97,7 +97,7 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind
static char *strjoin(const char *s1, int sep_char, const char *s2) { static char *strjoin(const char *s1, int sep_char, const char *s2) {
int l1 = strlen(s1); int l1 = strlen(s1);
int l2 = strlen(s2); int l2 = strlen(s2);
char *s = m_new(char, l1 + l2 + 2); char *s = malloc(l1 + l2 + 2);
memcpy(s, s1, l1); memcpy(s, s1, l1);
if (sep_char != 0) { if (sep_char != 0) {
s[l1] = sep_char; s[l1] = sep_char;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment