plus de leaks yeaaah
This commit is contained in:
42
srcs/stop.c
42
srcs/stop.c
@@ -18,10 +18,8 @@ void ps_error(int err)
|
||||
|
||||
void ps_stop(t_stack *stack, t_list *lst, int err)
|
||||
{
|
||||
/*
|
||||
t_stack **a;
|
||||
t_stack **b;
|
||||
t_list *solution;
|
||||
|
||||
if (stack)
|
||||
ft_lstclear((t_list **)&stack, NULL);
|
||||
@@ -31,48 +29,12 @@ void ps_stop(t_stack *stack, t_list *lst, int err)
|
||||
b = lst->next->content;
|
||||
ft_lstclear((t_list **)a, NULL);
|
||||
ft_lstclear((t_list **)b, NULL);
|
||||
lst->content = NULL;
|
||||
lst->next->content = NULL;
|
||||
ft_lstclear(&lst, free);
|
||||
}
|
||||
(void)solution;
|
||||
*/
|
||||
|
||||
/*
|
||||
t_list *tmp;
|
||||
t_stack **aa;
|
||||
t_stack **bb;
|
||||
t_stack *a;
|
||||
t_stack *b;
|
||||
|
||||
aa = lst->content;
|
||||
a = *aa;
|
||||
bb = lst->next->content;
|
||||
b = *bb;
|
||||
// ft_putnbrendl(a->n);
|
||||
// ft_putnbrendl(b->n);
|
||||
|
||||
tmp = lst;
|
||||
lst = lst->next;
|
||||
free(tmp);
|
||||
|
||||
tmp = lst;
|
||||
lst = lst->next;
|
||||
free(tmp);
|
||||
|
||||
while (lst)
|
||||
{
|
||||
tmp = lst->next;
|
||||
free(lst->content);
|
||||
free(lst);
|
||||
lst = tmp;
|
||||
}
|
||||
(void)a;
|
||||
(void)b;
|
||||
*/
|
||||
|
||||
if (err < 0)
|
||||
return ;
|
||||
else if (err > 0)
|
||||
ps_error(err);
|
||||
(void)stack;
|
||||
(void)lst;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user