Without this get_next_line frees its memory on EOF,
but when invalid command is entered, EOF never comes.
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/24 10:31:06 by ljiriste #+# #+# */
-/* Updated: 2024/03/05 09:40:36 by ljiriste ### ########.fr */
+/* Updated: 2024/03/05 12:46:19 by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
if (command_parse(input, &command))
{
free(input);
+ get_next_line(-1);
return (1);
}
execute(command, s);