libft
src
ft_memdel.c
Go to the documentation of this file.
1
/* ************************************************************************** */
3
/* */
4
/* ::: :::::::: */
5
/* ft_memdel.c :+: :+: :+: */
6
/* +:+ +:+ +:+ */
7
/* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8
/* +#+#+#+#+#+ +#+ */
9
/* Created: 2019/09/05 00:30:56 by unite #+# #+# */
10
/* Updated: 2020/07/16 02:56:56 by unite ### ########.fr */
11
/* */
12
/* ************************************************************************** */
13
14
#include "
libft.h
"
15
#include <stdlib.h>
16
22
void
ft_memdel
(
void
**ap)
23
{
24
if
(!ap || !(*ap))
25
return ;
26
free(*ap);
27
*ap = 0;
28
}
libft.h
ft_memdel
void ft_memdel(void **ap)
Frees memory where a pointer points to and sets the pointer to NULL.
Definition:
ft_memdel.c:22
Generated by
1.8.16