Commits

Peter Brune committed 7cd33a7

Fix Galerkin FAS memory leak.

  • Participants
  • Parent commits 814cd77

Comments (0)

Files changed (1)

File src/snes/impls/fas/fas.c

   ierr = MatDestroy(&fas->interpolate);CHKERRQ(ierr);
   ierr = MatDestroy(&fas->restrct);CHKERRQ(ierr);
   ierr = VecDestroy(&fas->rscale);CHKERRQ(ierr);
+  if (fas->galerkin) {
+    ierr = VecDestroy(&fas->Xg);CHKERRQ(ierr);
+    ierr = VecDestroy(&fas->Fg);CHKERRQ(ierr);
+  }
   if (fas->next) ierr = SNESReset(fas->next);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }