From 880102ae9358db130ef67cc9a7177a1e1de76875 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 17 Jul 2019 19:30:52 +0200 Subject: c10 tail stuff, c11 start, c12/c13 files --- c12/ex00/ft_create_elem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'c12/ex00/ft_create_elem.c') diff --git a/c12/ex00/ft_create_elem.c b/c12/ex00/ft_create_elem.c index 8b6996a..092833b 100644 --- a/c12/ex00/ft_create_elem.c +++ b/c12/ex00/ft_create_elem.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/09 17:19:22 by cacharle #+# #+# */ -/* Updated: 2019/07/09 17:19:24 by cacharle ### ########.fr */ +/* Updated: 2019/07/17 18:34:23 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,7 +17,8 @@ t_list *ft_create_elem(void *data) { t_list *list; - list = (t_list*)malloc(sizeof(t_list)); + if((list = (t_list*)malloc(sizeof(t_list))) == NULL) + return (NULL); list->data = data; list->next = NULL; return (list); -- cgit