correction memcpy pour le cas ou dst et src sont nuls

This commit is contained in:
Hugo LAMY
2019-11-28 13:51:50 +01:00
parent feede2804f
commit b542d8adc0
152 changed files with 3206 additions and 5 deletions

26
srcs/ft_memdel.c Normal file
View File

@@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memdel.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/14 21:13:26 by hulamy #+# #+# */
/* Updated: 2019/04/03 15:44:12 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
/*
** free memory
*/
#include "libft.h"
void ft_memdel(void **ap)
{
if (ap && *ap)
{
free(*ap);
*ap = 0;
}
}