mirror of
https://github.com/facebook/zstd.git
synced 2025-10-04 00:02:33 -04:00
Ensure BMK_timedFnState is always freed in benchMem
When an error occurs in BMK_isSuccessful_runOutcome, the code previously skipped the call to BMK_freeTimedFnState(tfs), leaking the allocated tfs object. Fiexed by calling BMK_freeTimedFnState(tfs) before goto _cleanOut.
This commit is contained in:
parent
5e6bdf5e3d
commit
cad0b72ad8
@ -890,6 +890,7 @@ static int benchMem(unsigned scenarioID,
|
||||
if (!BMK_isSuccessful_runOutcome(bOutcome)) {
|
||||
DISPLAY("ERROR: Scenario %u: %s \n", scenarioID, ZSTD_getErrorName(BMK_extract_errorResult(bOutcome)));
|
||||
errorcode = 1;
|
||||
BMK_freeTimedFnState(tfs);
|
||||
goto _cleanOut;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user