Fixed a memory leak: HYPRE_ConvertParCSRMatrixToDistributedMatrix

already calls HYPRE_DistributedMatrixCreate
This commit is contained in:
chow 2000-08-29 09:07:44 +00:00
parent 9ea4575e20
commit 9233e32cc6
2 changed files with 2 additions and 4 deletions

View File

@ -113,8 +113,7 @@ HYPRE_ParCSRParaSailsSetup( HYPRE_Solver solver,
HYPRE_DistributedMatrix mat;
Secret *secret = (Secret *) solver;
ierr = HYPRE_DistributedMatrixCreate(secret->comm, &mat);
if (ierr) return ierr;
/* The following call will also create the distributed matrix */
ierr = HYPRE_ConvertParCSRMatrixToDistributedMatrix( A, &mat );
if (ierr) return ierr;

View File

@ -113,8 +113,7 @@ HYPRE_ParCSRParaSailsSetup( HYPRE_Solver solver,
HYPRE_DistributedMatrix mat;
Secret *secret = (Secret *) solver;
ierr = HYPRE_DistributedMatrixCreate(secret->comm, &mat);
if (ierr) return ierr;
/* The following call will also create the distributed matrix */
ierr = HYPRE_ConvertParCSRMatrixToDistributedMatrix( A, &mat );
if (ierr) return ierr;