diff --git a/lib/node_modules/@stdlib/blas/base/dasum/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/dasum/benchmark/c/benchmark.length.c index 617865ed3f15..671b6348af7c 100644 --- a/lib/node_modules/@stdlib/blas/base/dasum/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/base/dasum/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double y; 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 +118,7 @@ static double benchmark1( int iterations, int len ) { if ( y != y ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -129,11 +131,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double y; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double()*20000.0 ) - 10000.0; } @@ -150,6 +153,7 @@ static double benchmark2( int iterations, int len ) { if ( y != y ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; }