mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 13:31:21 +03:00
dynamically allocated memory must be freed
Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
This commit is contained in:
parent
6a9383f564
commit
2c00b915a9
@ -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