summaryrefslogtreecommitdiff
path: root/src/matrix.c
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-13 21:09:27 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-10-13 21:09:27 -0600
commit1b4d91e623a083690ac6554d1aeaa38b75469908 (patch)
tree7809b42dbd8f7c9d841400e789bfe155fc699903 /src/matrix.c
parentd21a7de801b4a326001e45c0d26826e9ab53589b (diff)
downloadcmath-1b4d91e623a083690ac6554d1aeaa38b75469908.tar.gz
cmath-1b4d91e623a083690ac6554d1aeaa38b75469908.zip
updates to matrix.c
Diffstat (limited to 'src/matrix.c')
-rw-r--r--src/matrix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/matrix.c b/src/matrix.c
index 51de22c..ac4d138 100644
--- a/src/matrix.c
+++ b/src/matrix.c
@@ -35,8 +35,9 @@ Matrix_double **lu_decomp(Matrix_double *m) {
assert(m->cols == m->rows);
Matrix_double *u = copy_matrix(m);
- Matrix_double *l = InitMatrixWithSize(double, m->rows, m->cols, 0.0);
- put_identity_diagonal(l);
+ Matrix_double *l_empt = InitMatrixWithSize(double, m->rows, m->cols, 0.0);
+ Matrix_double *l = put_identity_diagonal(l_empt);
+ free(l_empt);
Matrix_double **u_l = malloc(sizeof(Matrix_double *) * 2);