solved leaks still reachable because gnl wasn't going to the end, and close fd

This commit is contained in:
Hugo LAMY
2022-05-04 22:00:36 +02:00
parent d4e5f298fa
commit c89c107e09
9 changed files with 47 additions and 48 deletions

View File

@@ -6,7 +6,7 @@
/* By: pblagoje <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/04 13:42:00 by pblagoje #+# #+# */
/* Updated: 2022/05/04 13:43:02 by pblagoje ### ########.fr */
/* Updated: 2022/05/04 21:58:13 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,6 +17,8 @@ void destroy_mlx(void *param)
t_game *game;
game = param;
if (game->fd != -1)
close(game->fd);
if (game->mlx_ptr == NULL)
return ;
if (game->img.ptr)