fixing leaks

This commit is contained in:
Angel Ortigosa Perez
2026-01-25 16:40:11 +01:00
parent bec53b6484
commit 16b935470a
6 changed files with 36245 additions and 20 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/15 18:37:44 by aortigos #+# #+# */
/* Updated: 2025/12/09 19:59:07 by aortigos ### ########.fr */
/* Updated: 2026/01/25 16:06:30 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
@@ -47,6 +47,12 @@ char *get_next_line(int fd)
char *line;
static char *left_str;
if (fd == -1)
{
free(left_str);
left_str = NULL;
return (NULL);
}
if (fd < 0 || BUFFER_SIZE <= 0)
{
return (0);