diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-01 16:25:07 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-01 16:25:07 +0200 |
commit | fb2f240c6ffb1d10c0dd0d482322b7f08308e63e (patch) | |
tree | 41f63e8cbb103dbc73c040651887644f60c94a03 /src | |
parent | Multiline added for && (diff) | |
download | 42-minishell-fb2f240c6ffb1d10c0dd0d482322b7f08308e63e.tar.gz 42-minishell-fb2f240c6ffb1d10c0dd0d482322b7f08308e63e.tar.bz2 42-minishell-fb2f240c6ffb1d10c0dd0d482322b7f08308e63e.tar.xz 42-minishell-fb2f240c6ffb1d10c0dd0d482322b7f08308e63e.tar.zst 42-minishell-fb2f240c6ffb1d10c0dd0d482322b7f08308e63e.zip |
Secured malloc
Diffstat (limited to '')
-rw-r--r-- | src/s_line.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |