summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-01 16:25:07 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-01 16:25:07 +0200
commitfb2f240c6ffb1d10c0dd0d482322b7f08308e63e (patch)
tree41f63e8cbb103dbc73c040651887644f60c94a03 /src
parentMultiline added for && (diff)
download42-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 'src')
-rw-r--r--src/s_line.c4
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);
}