Skip to content

Commit

Permalink
Fix memory leak in umfpack_numeric! (#37472)
Browse files Browse the repository at this point in the history
(cherry picked from commit b17cd10)
  • Loading branch information
cfauchereau authored and KristofferC committed Sep 10, 2020
1 parent bcc6a87 commit 9f1d1fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stdlib/SuiteSparse/src/umfpack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ for itype in UmfpackIndexTypes
if status != UMFPACK_WARNING_singular_matrix
umferror(status)
end
U.numeric != C_NULL && umfpack_free_numeric(U)
U.numeric = tmp[1]
return U
end
Expand All @@ -349,6 +350,7 @@ for itype in UmfpackIndexTypes
if status != UMFPACK_WARNING_singular_matrix
umferror(status)
end
U.numeric != C_NULL && umfpack_free_numeric(U)
U.numeric = tmp[1]
return U
end
Expand Down

0 comments on commit 9f1d1fa

Please sign in to comment.