Index: ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp
===================================================================
--- ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp	(revision 18855)
+++ ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp	(revision 18856)
@@ -147,6 +147,7 @@
 	xDelete<double>(dz);
 	xDelete<double>(XU);
 	xDelete<double>(XL);
+	xDelete<double>(scaling_factors);
 }
 
 /*Cost function definition*/
@@ -242,6 +243,7 @@
 	xDelete<IssmDouble>(Jlist);
 	xDelete<IssmDouble>(XU);
 	xDelete<IssmDouble>(XL);
+	xDelete<IssmDouble>(scaling_factors);
 }
 
 #else
