aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_tex.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 18:19:20 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-01-24 18:19:20 +0100
commit4286b43e9e35242b03f5a38af1099f77901c0b3e (patch)
tree6ee93930d83e24f047cbd72dbfbcbd8ebfa14dfc /src/ft_get_tex.c
parentAdded a second map for error management (diff)
download42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.gz
42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.bz2
42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.xz
42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.tar.zst
42-cub3d-4286b43e9e35242b03f5a38af1099f77901c0b3e.zip
Much cleaner
Diffstat (limited to 'src/ft_get_tex.c')
-rw-r--r--src/ft_get_tex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ft_get_tex.c b/src/ft_get_tex.c
index 65c8441..6bd2b7c 100644
--- a/src/ft_get_tex.c
+++ b/src/ft_get_tex.c
@@ -14,7 +14,10 @@ ft_get_tex_no(int fd, t_win *wlist)
return (ft_exit(5, wlist));
if (!(*words) || ft_strcmp(*words, "NO")
|| !(*(words + 1)) || (*(words + 2)))
+ {
+ ft_free_words(words);
return (ft_map_error(2, wlist));
+ }
ft_memdel(wlist->clist->no_tex_path);
len = ft_strlen(*(words + 1));
if (!(wlist->clist->no_tex_path = (char*)malloc((len + 1) * sizeof(char))))