Index: /issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 11759)
+++ /issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 11760)
@@ -43,9 +43,21 @@
 		/*Create vector out of petsc vector: */
 		uf=new Vector(uf_vector);
+
+		/*Free ressources: */
+		VecFree(&uf_vector);
 	#else
 		#ifdef _HAVE_GSL_
-		SolverxGsl(&uf->vector,Kff->matrix,pf->vector);
+		SeqVec* uf_vector=NULL;
+
+		SolverxGsl(&uf_vector,Kff->matrix,pf->vector);
+
+		/*Create vector out of SeqVec vector: */
+		uf=new Vector(uf_vector);
+
+		/*Free ressources: */
+		delete uf_vector;
+
 		#else
-			_error_("not supported yet!");
+			_error_("GSL support not compiled in!");
 		#endif
 	#endif
Index: /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 11759)
+++ /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 11760)
@@ -24,7 +24,5 @@
 	SeqVec*        uf               = NULL;
 
-	/*We are going to do an in place LU decomp, so we need to save the matrix with its original structure: */
-	KffCopy=Kff->Duplicate();
-
+	
 	/*GSL Matrices and vectors: */
 	gsl_matrix_view m;
@@ -33,4 +31,8 @@
 	gsl_permutation* p=NULL;
 	
+	/*We are going to do an in place LU decomp, so we need to save the matrix with its original structure: */
+	KffCopy=Kff->Duplicate();
+
+
 	/*Intermediary: */
 	int M,N,N2,s;
@@ -61,5 +63,7 @@
 	gsl_permutation_free (p);
 	gsl_vector_free (x);
+
 	delete KffCopy;
+
 
 	/*Assign output pointers:*/
