diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-02-20 20:28:21 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-02-20 20:28:21 +0100 |
commit | 5b3b8e9076d903d66e1c853c637ba466ffa282a2 (patch) | |
tree | ebb0eaf185a2cd48cfe4f6cd075e72968eb34859 /src | |
parent | fix wall_textures on map_three (diff) | |
download | 42-cub3d-5b3b8e9076d903d66e1c853c637ba466ffa282a2.tar.gz 42-cub3d-5b3b8e9076d903d66e1c853c637ba466ffa282a2.tar.bz2 42-cub3d-5b3b8e9076d903d66e1c853c637ba466ffa282a2.tar.xz 42-cub3d-5b3b8e9076d903d66e1c853c637ba466ffa282a2.tar.zst 42-cub3d-5b3b8e9076d903d66e1c853c637ba466ffa282a2.zip |
Freed leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/ft_exit.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |