diff --git a/lib/node_modules/@stdlib/blas/ext/base/snansumors/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/snansumors/benchmark/c/benchmark.length.c index 48d080a30827..2b74702f4aec 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/snansumors/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/snansumors/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++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -122,6 +123,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -134,11 +136,12 @@ static double benchmark1( int iterations, int len ) { */ 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++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -160,6 +163,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; }