From bc78305689d504fecab0999baea00a54ebcf54e5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 16 Mar 2020 17:40:24 +0100 Subject: 3,000,000 bytes leaked xd fuck heap --- src/ft_exit.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ft_exit.c') 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); } -- cgit v1.2.3