Merge lu_decomposition bugfix\n deallocate memory

This commit is contained in:
Krishna Vedala 2020-06-08 12:29:45 -04:00
commit 37ca26db67
No known key found for this signature in database
GPG Key ID: BA19ACF8FC8792F7
1 changed files with 11 additions and 0 deletions

View File

@ -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;
}