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
commit 5b6fbf5f96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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