corrected invalid read on print_map

caused by exessive ft_strdel instruction in lm_parser
This commit is contained in:
Tanguy MAZE
2019-04-29 13:08:08 +02:00
parent a51c8ad81d
commit b22a1a5af7
3 changed files with 6 additions and 12 deletions

View File

@@ -6,11 +6,12 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/24 17:35:29 by tmaze #+# #+# */
/* Updated: 2019/04/29 12:40:25 by mndhlovu ### ########.fr */
/* Updated: 2019/04/29 13:05:56 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
#include <stdio.h>
void del_map(t_lmdata *data)
{
@@ -18,9 +19,9 @@ void del_map(t_lmdata *data)
while (data->map)
{
ft_strdel(&(data->map->line));
tmp = data->map;
data->map = data->map->next;
ft_strdel(&(tmp->line));
ft_memdel((void**)&tmp);
}
}