Skip to content

Commit

Permalink
Fix TLS leak in case of multiple load/free cycles of NeoMathEngine.dll (
Browse files Browse the repository at this point in the history
neoml-lib#650)

Signed-off-by: Valeriy Fedyunin <valery.fedyunin@abbyy.com>
  • Loading branch information
Valeriy Fedyunin committed Jun 7, 2022
1 parent 76eed53 commit 59e96d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NeoMathEngine/src/CPU/CpuMathEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ void DeinitializeNeoMathEngine()
{
#ifdef NEOML_USE_MKL
mkl_free_buffers();
#if FINE_PLATFORM( FINE_WINDOWS )
MKLFreeTls( DLL_PROCESS_DETACH );
#endif
mkl_finalize();
#endif
}
Expand Down

0 comments on commit 59e96d7

Please sign in to comment.