Skip to content

Commit 164abe0

Browse files
cfauchereauKristofferC
authored andcommitted
Fix memory leak in umfpack_numeric! (#37472)
(cherry picked from commit b17cd10)
1 parent 21d877d commit 164abe0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/SuiteSparse/src/umfpack.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ for itype in UmfpackIndexTypes
333333
if status != UMFPACK_WARNING_singular_matrix
334334
umferror(status)
335335
end
336+
U.numeric != C_NULL && umfpack_free_numeric(U)
336337
U.numeric = tmp[1]
337338
return U
338339
end
@@ -349,6 +350,7 @@ for itype in UmfpackIndexTypes
349350
if status != UMFPACK_WARNING_singular_matrix
350351
umferror(status)
351352
end
353+
U.numeric != C_NULL && umfpack_free_numeric(U)
352354
U.numeric = tmp[1]
353355
return U
354356
end

0 commit comments

Comments
 (0)