diff --git a/src/shogun/features/DataGenerator.cpp b/src/shogun/features/DataGenerator.cpp index 1e613f68af1..35a3854decf 100644 --- a/src/shogun/features/DataGenerator.cpp +++ b/src/shogun/features/DataGenerator.cpp @@ -104,6 +104,7 @@ SGMatrix CDataGenerator::generate_gaussians(index_t m, index_t n, ind { SGVector v = g->sample(); memcpy((result.matrix+j*result.num_rows+i*m*dim), v.vector, dim*sizeof(float64_t)); + SG_FREE(v.vector); } SG_UNREF(g);