mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 08:41:58 +00:00
fixing the leak valgrind and conditionnal jump on some functions cause i forget to initialize the var to NULL i just need to remember this
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
void print_tabs(t_tab *preset)
|
||||
{
|
||||
t_tab *tab;
|
||||
|
||||
|
||||
tab = preset;
|
||||
while (tab)
|
||||
{
|
||||
@@ -59,6 +59,8 @@ t_stacks *init_big_stacks2(int *tab, int len)
|
||||
t_stack *a;
|
||||
|
||||
stacks = malloc(sizeof(t_stacks));
|
||||
stacks->a = NULL;
|
||||
stacks->b = NULL;
|
||||
if (!stacks)
|
||||
return (NULL);
|
||||
a = parsing2(tab, len);
|
||||
|
||||
Reference in New Issue
Block a user