From 5b3b8e9076d903d66e1c853c637ba466ffa282a2 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 20 Feb 2020 20:28:21 +0100 Subject: Freed leaks --- src/ft_exit.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ft_exit.c b/src/ft_exit.c index f0a94a3..b9e061f 100644 --- a/src/ft_exit.c +++ b/src/ft_exit.c @@ -40,7 +40,14 @@ int ft_exit(uint8_t exit_code, t_cub *clist) { if (clist->wlist->inited) + { + mlx_destroy_image(clist->wlist->wlx, clist->tlist[0].img); + mlx_destroy_image(clist->wlist->wlx, clist->tlist[1].img); + mlx_destroy_image(clist->wlist->wlx, clist->tlist[2].img); + mlx_destroy_image(clist->wlist->wlx, clist->tlist[3].img); + mlx_destroy_image(clist->wlist->wlx, clist->tlist[4].img); mlx_destroy_window(clist->wlist->wlx, clist->wlist->winptr); + } ft_free_lists(clist); ft_printf("Exiting program\n"); exit(exit_code); -- cgit v1.2.3