Index: ../trunk-jpl/src/c/cores/controlvalidation_core.cpp
===================================================================
--- ../trunk-jpl/src/c/cores/controlvalidation_core.cpp	(revision 18572)
+++ ../trunk-jpl/src/c/cores/controlvalidation_core.cpp	(revision 18573)
@@ -35,8 +35,7 @@
 	X0 = Xpetsc->ToMPISerial();
 	delete Xpetsc;
 
-	/*Allocate Gradient and current vector*/
-	G = xNew<IssmDouble>(n);
+	/*Allocate current vector*/
 	X = xNew<IssmDouble>(n);
 
 	/*out of solution_type, figure out solution core and adjoint function pointer*/
@@ -109,6 +108,7 @@
 	femmodel->OutputControlsx(&femmodel->results);
 
 	/*Clean up and return*/
+	xDelete<IssmDouble>(output);
 	xDelete<IssmDouble>(G);
 	xDelete<IssmDouble>(X);
 	xDelete<IssmDouble>(X0);
Index: ../trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 18572)
+++ ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 18573)
@@ -1484,7 +1484,8 @@
 			 /*Compute SurfaceAbsMisfitEnum*/
 			 J+=0.5*(surface-surfaceobs)*(surface-surfaceobs)*weight*Jdet*gauss->weight;
 		 }
-
+		 delete gauss;
+		 xDelete<IssmDouble>(xyz_list);
 	}
 
 	/*Sum all J from all cpus of the cluster:*/
