mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-25 23:09:36 +03:00
Merge lu_decomposition bugfix\n deallocate memory
This commit is contained in:
commit
37ca26db67
@ -113,5 +113,16 @@ int main(int argc, char **argv)
|
||||
printf("\nU = \n");
|
||||
display(U, mat_size);
|
||||
|
||||
/* Free dynamically allocated memory */
|
||||
for (int i = 0; i < mat_size; i++)
|
||||
{
|
||||
free(A[i]);
|
||||
free(L[i]);
|
||||
free(U[i]);
|
||||
}
|
||||
free(A);
|
||||
free(L);
|
||||
free(U);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user