Index: ../trunk-jpl/src/m/contrib/gravity/vfsa_mpi.cpp
===================================================================
--- ../trunk-jpl/src/m/contrib/gravity/vfsa_mpi.cpp	(revision 18468)
+++ ../trunk-jpl/src/m/contrib/gravity/vfsa_mpi.cpp	(revision 18469)
@@ -402,6 +402,8 @@
 				consec++;
 			}
 		}
+		if(!my_rank){
+		}
 	}
 
 	m_min->MatrixEqual(m_old);
@@ -475,6 +477,7 @@
 	*pX = X;
 
 	gsl_matrix_free(a);
+	gsl_vector_free(x);
 	gsl_vector_free(b);
 	gsl_matrix_free(cov);
 
@@ -656,6 +659,18 @@
 		b=b+fabs(evalid->GetValue(i,0)*(gobs->GetValue(i,0)+g->GetValue(i,0)));
 	}
 	e=2*a/(a+b);
+
+	delete m1;
+	delete m2;
+	delete g1;
+	delete g2;
+	delete g;
+	delete gcalgr;
+	delete gcalvec;
+	delete df;
+	delete G;
+	delete M;
+
 	return e;
 }/*}}}*/
 void newmodelgen(Matrix* m0,Matrix* m1,Matrix* bathy,Matrix* icethick,int mx,int my,double T,double ptval,double mmax,double mmax2,double ctr,double sd){/*{{{*/
