Index: /issm/branches/trunk-larour-SLPS2022/src/c/classes/FemModel.cpp
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/classes/FemModel.cpp	(revision 27221)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/classes/FemModel.cpp	(revision 27222)
@@ -4691,4 +4691,5 @@
 	}
 	xDelete<IssmDouble*>(response_partitions);
+	xDelete<int>(response_partitions_npart);
 
 }
Index: /issm/branches/trunk-larour-SLPS2022/src/c/classes/Params/DoubleMatArrayParam.cpp
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/classes/Params/DoubleMatArrayParam.cpp	(revision 27221)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/classes/Params/DoubleMatArrayParam.cpp	(revision 27222)
@@ -161,9 +161,12 @@
 	if(out_M){
 		out_array=xNew<IssmDouble*>(M);
-		out_mdim_array=xNew<int>(M);
-		out_ndim_array=xNew<int>(M);
-
-		xMemCpy<int>(out_mdim_array,this->mdim_array,M);
-		xMemCpy<int>(out_ndim_array,this->ndim_array,M);
+		if(pout_mdim_array){
+			out_mdim_array=xNew<int>(M);
+			xMemCpy<int>(out_mdim_array,this->mdim_array,M);
+		}
+		if(pout_ndim_array){
+			out_ndim_array=xNew<int>(M);
+			xMemCpy<int>(out_ndim_array,this->ndim_array,M);
+		}
 
 		for(i=0;i<this->M;i++){
