Cleaned the seg faults and normed the code, only

lm_mem_utils has a norm error.
This commit is contained in:
Mthandazo Ndhlovu
2019-05-06 08:05:37 +02:00
parent a40b6b00e7
commit a21860983e
14 changed files with 139 additions and 10737 deletions

View File

@@ -6,23 +6,25 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/24 17:35:29 by tmaze #+# #+# */
/* Updated: 2019/05/02 13:09:34 by mndhlovu ### ########.fr */
/* Updated: 2019/05/06 07:38:36 by mndhlovu ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
#include <stdio.h>
void del_map(t_lmdata *data)
{
t_rdata *tmp;
while (data->map)
if (data != NULL)
{
tmp = data->map;
data->map = data->map->next;
ft_strdel(&(tmp->line));
ft_memdel((void**)&tmp);
while (data->map)
{
tmp = data->map;
data->map = data->map->next;
ft_strdel(&(tmp->line));
ft_memdel((void**)&tmp);
}
}
}
@@ -59,4 +61,3 @@ int add_line_map(t_lmdata *data, char *line)
}
return (0);
}