Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 17981)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 17982)
@@ -1217,26 +1217,17 @@
 void       Penta::InputExtrude(int enum_type){/*{{{*/
 
-	int     i,num_inputs;
-	Penta  *penta       = NULL;
-	Input  *copy        = NULL;
-	Input **base_inputs = NULL;
-
 	/*Are we on the base, not on the surface?:*/
 	if(!IsOnBase()) return;
 
 	/*Step1: Get and Extrude original input: */
-	num_inputs=1;
-	base_inputs=xNew<Input*>(num_inputs);
-	base_inputs[0]=(Input*)this->inputs->GetInput(enum_type);
-	for(i=0;i<num_inputs;i++){
-		if(!base_inputs[i]) _error_("could not find input with enum " << EnumToStringx(enum_type));
-		base_inputs[i]->Extrude();
-	}
+	Input* base_input=(Input*)this->inputs->GetInput(enum_type);
+	if(!base_input) _error_("could not find input with enum " << EnumToStringx(enum_type));
+	base_input->Extrude();
 
 	/*Stop if there is only one layer of element*/
-	if (this->IsOnSurface()) return;
+	if(this->IsOnSurface()) return;
 
 	/*Step 2: this input has been extruded for this element, now follow the upper element*/
-	penta=this;
+	Penta* penta=this;
 	for(;;){
 		/* get upper Penta*/
@@ -1245,15 +1236,10 @@
 
 		/*Add input of the basal element to penta->inputs*/
-		for(i=0;i<num_inputs;i++){
-			copy=(Input*)base_inputs[i]->copy();
-			penta->inputs->AddInput((Input*)copy);
-		}
+		Input* copy=(Input*)base_input->copy();
+		penta->inputs->AddInput((Input*)copy);
 
 		/*Stop if we have reached the surface*/
-		if (penta->IsOnSurface()) break;
-	}
-
-	/*clean-up and return*/
-	xDelete<Input*>(base_inputs);
+		if(penta->IsOnSurface()) break;
+	}
 }
 /*}}}*/
