From 4286b43e9e35242b03f5a38af1099f77901c0b3e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 24 Jan 2020 18:19:20 +0100 Subject: Much cleaner --- src/ft_get_tex.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ft_get_tex.c') 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)))) -- cgit v1.2.3