[cig-commits] r22497 - short/3D/PyLith/trunk/libsrc/pylith/problems

knepley at geodynamics.org knepley at geodynamics.org
Tue Jul 2 15:16:33 PDT 2013


Author: knepley
Date: 2013-07-02 15:16:33 -0700 (Tue, 02 Jul 2013)
New Revision: 22497

Modified:
   short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
Log:
Fixed memory leak

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2013-07-02 21:43:53 UTC (rev 22496)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2013-07-02 22:16:33 UTC (rev 22497)
@@ -291,6 +291,7 @@
     err = DMGetDefaultGlobalSection(lagrangeDM, &lagrangeSection);PYLITH_CHECK_ERROR(err);
     err = PetscSectionGetStorageSize(lagrangeSection, &nrows);PYLITH_CHECK_ERROR(err);
     ncols = nrows;
+    err = DMDestroy(&lagrangeDM);PYLITH_CHECK_ERROR(err);
 
     err = MatCreate(comm, &_jacobianPCFault);PYLITH_CHECK_ERROR(err);
     err = MatSetSizes(_jacobianPCFault, nrows, ncols, PETSC_DECIDE, PETSC_DECIDE);PYLITH_CHECK_ERROR(err);



More information about the CIG-COMMITS mailing list