From fb2f240c6ffb1d10c0dd0d482322b7f08308e63e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 1 Sep 2020 16:25:07 +0200 Subject: Secured malloc --- src/s_line.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/s_line.c b/src/s_line.c index b47b453..ae0ec07 100644 --- a/src/s_line.c +++ b/src/s_line.c @@ -80,7 +80,7 @@ t_line link->next = NULL; return (link); } - link->com = s_com_new(word, msh); - /* TODO: check link->com = NULL */ + if ((link->com = s_com_new(word, msh)) == NULL) + return (NULL); return (link); } -- cgit v1.2.3