diff --git a/lib/node_modules/@stdlib/blas/ext/base/ssumors/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/ssumors/benchmark/c/benchmark.length.c index 9a11fbf34056..12c483e1b646 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ssumors/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ssumors/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 v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -118,16 +119,18 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -145,6 +148,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; }