diff --git a/lib/node_modules/@stdlib/stats/strided/dmean/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dmean/benchmark/c/benchmark.length.c index f2d61f41a571..d919e277020c 100644 --- a/lib/node_modules/@stdlib/stats/strided/dmean/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dmean/benchmark/c/benchmark.length.c @@ -96,11 +96,11 @@ static double rand_double( void ) { */ static double benchmark( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; - + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -117,6 +117,7 @@ static double benchmark( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; }