diff --git a/alpha_beta.c b/alpha_beta.c --- a/alpha_beta.c +++ b/alpha_beta.c @@ -74,6 +74,7 @@ board[stack_end->data->target] = EMPTY; actual = stack_end->prev; + free (stack_end->data); free (stack_end); stack_end = actual; @@ -340,6 +341,7 @@ print (); if ((estimateFunction () * estimateFunction ()) == 2500) { + free (actual); return EXIT_SUCCESS; } @@ -348,6 +350,7 @@ } print (); + free (actual); return EXIT_SUCCESS; }