Skip to content

Commit a88773e

Browse files
committed
Fixed memory leaks in MuParserSSE and TinyExpr benchmarks due to addition of new preliminary variable checks.
1 parent a884b78 commit a88773e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/BenchMuParserSSE.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ double BenchMuParserSSE::DoBenchmark(const std::string& sExpr, long iCount)
7272
(!is_equal((float)test.second,pttestfun()))
7373
)
7474
{
75+
mecRelease(htestParser);
7576
test_result = false;
7677
break;
7778
}
79+
80+
mecRelease(htestParser);
7881
}
7982

8083
if (!test_result)

src/BenchTinyExpr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ double BenchTinyExpr::DoBenchmark(const std::string& sExpr, long iCount)
5959
test_result = false;
6060
break;
6161
}
62+
63+
te_free(test_expression);
6264
}
6365

6466
if (!test_result)

0 commit comments

Comments
 (0)