aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-02-02 17:05:54 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-02-02 17:05:54 +0100
commit8d7f65c1c04f7124f1a34062be377fdbe721c46a (patch)
tree36ef68573148ba58843608a499504138cca3595d /src/ft_exit.c
parentRemoved whitespace (diff)
download42-cub3d-8d7f65c1c04f7124f1a34062be377fdbe721c46a.tar.gz
42-cub3d-8d7f65c1c04f7124f1a34062be377fdbe721c46a.tar.bz2
42-cub3d-8d7f65c1c04f7124f1a34062be377fdbe721c46a.tar.xz
42-cub3d-8d7f65c1c04f7124f1a34062be377fdbe721c46a.tar.zst
42-cub3d-8d7f65c1c04f7124f1a34062be377fdbe721c46a.zip
Correct ft_memdel
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
index 8bd8ac0..6631c34 100644
--- a/src/ft_exit.c
+++ b/src/ft_exit.c
@@ -8,17 +8,18 @@
static void
ft_free_lists(t_cub *clist)
{
- ft_memdel(clist->no_tex_path);
- ft_memdel(clist->so_tex_path);
- ft_memdel(clist->ea_tex_path);
- ft_memdel(clist->we_tex_path);
- ft_memdel(clist->sprite_path);
+ ft_memdel((void**)&clist->no_tex_path);
+ ft_memdel((void**)&clist->so_tex_path);
+ ft_memdel((void**)&clist->ea_tex_path);
+ ft_memdel((void**)&clist->we_tex_path);
+ ft_memdel((void**)&clist->sprite_path);
+ ft_memdel((void**)&clist->mapl);
ft_free_words(clist->map);
if (!clist->wlist->inited)
- ft_memdel(clist->wlist->winptr);
- ft_memdel(clist->wlist->wlx);
- ft_memdel(clist->wlist);
- ft_memdel(clist);
+ ft_memdel((void**)&clist->wlist->winptr);
+ ft_memdel((void**)&clist->wlist->wlx);
+ ft_memdel((void**)&clist->wlist);
+ ft_memdel((void**)&clist);
}
int