1
0
mirror of https://github.com/facebook/zstd.git synced 2025-09-16 17:46:31 +02:00

Merge pull request #4392 from mugitya03/MLK

Fix potential memory leak in function `benchMem`
This commit is contained in:
Yann Collet
2025-06-08 12:38:31 -07:00
committed by GitHub

View File

@@ -739,6 +739,8 @@ static int benchMem(slice_collection_t dstBlocks, slice_collection_t srcBlocks,
/* BMK_benchTimedFn may not run exactly nbRounds iterations */
double speedAggregated =
aggregateData(speedPerRound, roundNb + 1, metricAggregatePref);
free(speedPerRound);
if (metricAggregatePref == fastest)
DISPLAY("Fastest Speed : %.1f MB/s \n", speedAggregated);
else