Skip to content

Commit 5eb3fa9

Browse files
committed
Memory leak in PETSc-code.hpp
1 parent 819afa0 commit 5eb3fa9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

plugin/mpi/PETSc-code.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4030,6 +4030,7 @@ namespace PETSc {
40304030
Matrice_Creuse< upscaled_type<PetscScalar> >* ptK =
40314031
(c == 0 || c == 3 ? GetAny< Matrice_Creuse< upscaled_type<PetscScalar> >* >((*K)(stack)) : nullptr);
40324032
if (ptB->_petsc && ptC->_petsc) {
4033+
if (ptA->_petsc) ptA->dtor( );
40334034
ptA->_first = ptB->_first;
40344035
ptA->_last = ptB->_last;
40354036
ptA->_cfirst = ptC->_first;

0 commit comments

Comments
 (0)