diff --git a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/benchmark/c/unsorted-random/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/benchmark/c/unsorted-random/benchmark.length.c index a92dfd1db8a1..8c63e53c99a1 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/benchmark/c/unsorted-random/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/benchmark/c/unsorted-random/benchmark.length.c @@ -96,10 +96,11 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double()*20.0 ) - 10.0; } @@ -115,6 +116,7 @@ static double benchmark1( int iterations, int len ) { if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -127,10 +129,11 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double()*20.0 ) - 10.0; } @@ -146,6 +149,7 @@ static double benchmark2( int iterations, int len ) { if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; }