Update Libft and use its feature to clean after gnl
authorLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Fri, 16 Feb 2024 23:13:44 +0000 (00:13 +0100)
committerLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Fri, 16 Feb 2024 23:13:44 +0000 (00:13 +0100)
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
src/main.c

diff --git a/Libft b/Libft
index 988bd412d9b3d0681457c4c169d398c273d0c6ff..0c6fb946da0bd3d8a0a15e4686020b3e103cdede 160000 (submodule)
--- a/Libft
+++ b/Libft
@@ -1 +1 @@
-Subproject commit 988bd412d9b3d0681457c4c169d398c273d0c6ff
+Subproject commit 0c6fb946da0bd3d8a0a15e4686020b3e103cdede
index 1584ce3e6b35350607f0049384a2f22bc28f408c..ac6d4a0d4c1fbcd75fd098ae94af118e695f6b1c 100644 (file)
@@ -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);
 }