From 0395261a0f276d7c37f33795ad941fcb34441b27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Sat, 17 Feb 2024 00:13:44 +0100 Subject: [PATCH] Update Libft and use its feature to clean after gnl Function get_next_line does not free all memory when reading from stdin when it doesn't contain end of file. The new version of Libft makes it possible to free the memory. --- Libft | 2 +- src/main.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Libft b/Libft index 988bd41..0c6fb94 160000 --- a/Libft +++ b/Libft @@ -1 +1 @@ -Subproject commit 988bd412d9b3d0681457c4c169d398c273d0c6ff +Subproject commit 0c6fb946da0bd3d8a0a15e4686020b3e103cdede diff --git a/src/main.c b/src/main.c index 1584ce3..ac6d4a0 100644 --- a/src/main.c +++ b/src/main.c @@ -278,5 +278,6 @@ int main(__attribute__((unused)) int argc, char **argv) update_nodes(NULL); ft_vec_free(&nodes, free_node); ft_vec_free(&mosfets, NULL); + get_next_line(-1); return (0); } -- 2.30.2