diff --git a/src/curve.cpp b/src/curve.cpp
index 8d835d57062906888d325f7ab198cc9f82b6169c..052cfc37aecbd6394e0e06f564c386b2662b57d3 100644
--- a/src/curve.cpp
+++ b/src/curve.cpp
@@ -684,5 +684,6 @@ double NCurveFile::NumericIntegral( const COlc *fc, const CCurve *c,
     else
         throw string( "invalid case in NumericIntegral" );
 
+    gsl_integration_workspace_free( work );
     return val;
 }