Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp	(revision 21788)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp	(revision 21789)
@@ -46,5 +46,5 @@
 				iomodel->FetchMultipleData(&gatenames,&numgates,                     "md.massfluxatgate.name");
 				iomodel->FetchMultipleData(&gatedefinitionstrings,&temp,             "md.massfluxatgate.definitionstring"); _assert_(temp==numgates);
-				iomodel->FetchMultipleData(&gatesegments,&gatesegments_M,NULL,&temp, "md.massfluxatgate.segments");       _assert_(temp==numgates);
+				iomodel->FetchMultipleData(&gatesegments,&gatesegments_M,NULL,&temp, "md.massfluxatgate.segments");         _assert_(temp==numgates);
 
 				for(j=0;j<numgates;j++){
@@ -53,6 +53,7 @@
 				/*Free ressources:*/
 				for(j=0;j<numgates;j++){
-					char*       string = gatenames[j];    xDelete<char>(string);
-					IssmDouble* gate   = gatesegments[j]; xDelete<IssmDouble>(gate);
+					char*       string  = gatenames[j];             xDelete<char>(string);
+					char*       string2 = gatedefinitionstrings[j]; xDelete<char>(string2);
+					IssmDouble* gate    = gatesegments[j];          xDelete<IssmDouble>(gate);
 				}
 				xDelete<char*>(gatenames);
