dynamically allocated memory must be freed

Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
This commit is contained in:
Krishna Vedala 2020-06-08 12:16:58 -04:00
parent 6a9383f564
commit 2c00b915a9
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;
}