From 8223b7e3f30393faeebb650bd771f7b6293352e3 Mon Sep 17 00:00:00 2001 From: Richard Schussnig Date: Tue, 18 Aug 2020 20:33:56 +0200 Subject: [PATCH] Destroy tmp matrix in mmult. When using a vector in the mmult, a tmp matrix with scaled rows is not destroyed - fix this. --- source/lac/petsc_matrix_base.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/lac/petsc_matrix_base.cc b/source/lac/petsc_matrix_base.cc index 24ffcb166b..e4cd993951 100644 --- a/source/lac/petsc_matrix_base.cc +++ b/source/lac/petsc_matrix_base.cc @@ -556,6 +556,8 @@ namespace PETScWrappers PETSC_DEFAULT, &result.petsc_matrix()); AssertThrow(ierr == 0, ExcPETScError(ierr)); + ierr = PETScWrappers::destroy_matrix(tmp); + AssertThrow(ierr == 0, ExcPETScError(ierr)); } } } // namespace internals -- 2.39.5