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