diff --git a/repl.c b/repl.c index 5772883..91301de 100644 --- a/repl.c +++ b/repl.c @@ -29,6 +29,7 @@ static char *readline(const char *prompt) { } line = malloc(len + 1); + if (!line) return NULL; strcpy(line, buf); return line; }