unset VAR leak fixed

This commit is contained in:
Jack Halford 2017-03-23 18:31:26 +01:00
parent 784d201914
commit 13ecf634e7
3 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/21 15:45:00 by jhalford #+# #+# */ /* Created: 2017/03/21 15:45:00 by jhalford #+# #+# */
/* Updated: 2017/03/23 18:25:12 by jhalford ### ########.fr */ /* Updated: 2017/03/23 18:31:10 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -19,7 +19,7 @@ void *ft_malloc(size_t size)
ptr = malloc(size); ptr = malloc(size);
if (!ptr) if (!ptr)
{ {
ft_putstrfd(strerror(errno), 2); ft_putstr_fd(strerror(errno), 2);
exit(errno); exit(errno);
} }
return (ptr); return (ptr);

View file

@ -6,7 +6,7 @@
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */ /* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/03 18:04:07 by jhalford #+# #+# */ /* Created: 2016/11/03 18:04:07 by jhalford #+# #+# */
/* Updated: 2017/03/23 18:18:07 by jhalford ### ########.fr */ /* Updated: 2017/03/23 18:31:06 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -17,7 +17,7 @@ void ft_sstrdel(char **sstr, int index)
int i; int i;
i = index; i = index;
ft_strdel(sstr + index); free(sstr[index]);
while (sstr[i]) while (sstr[i])
{ {
sstr[i] = sstr[i + 1]; sstr[i] = sstr[i + 1];

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */ /* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/28 14:25:17 by jhalford #+# #+# */ /* Created: 2016/11/28 14:25:17 by jhalford #+# #+# */
/* Updated: 2017/03/23 18:18:33 by jhalford ### ########.fr */ /* Updated: 2017/03/23 18:26:59 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */