aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-16 17:40:24 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-16 17:40:24 +0100
commitbc78305689d504fecab0999baea00a54ebcf54e5 (patch)
treef206dde0604622eb045fe21b4057a18f937f436c /src/ft_exit.c
parentDebug in progress (diff)
download42-cub3d-bc78305689d504fecab0999baea00a54ebcf54e5.tar.gz
42-cub3d-bc78305689d504fecab0999baea00a54ebcf54e5.tar.bz2
42-cub3d-bc78305689d504fecab0999baea00a54ebcf54e5.tar.xz
42-cub3d-bc78305689d504fecab0999baea00a54ebcf54e5.tar.zst
42-cub3d-bc78305689d504fecab0999baea00a54ebcf54e5.zip
3,000,000 bytes leaked xd fuck heap
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 80fd734..b2ccd69 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -23,6 +23,8 @@
static void
ft_free_lists(t_cub *clist)
{
+ uint8_t i;
+
ft_memdel((void**)&clist->mlist.filename);
ft_memdel((void**)&clist->mlist.no_tex_path);
ft_memdel((void**)&clist->mlist.so_tex_path);
@@ -47,6 +49,13 @@ static void
ft_free_sprites(clist->mlist.sprite_path);
if (!clist->wlist.inited)
ft_memdel((void**)&clist->wlist.winptr);
+ i = 0;
+ while (i < 8)
+ {
+ ft_memdel((void**)clist->sprites[i]);
+ i++;
+ }
+ ft_memdel((void**)&clist->sprites);
ft_memdel((void**)&clist);
}