Skip to content

Commit

Permalink
Fix #350 - memory leak on exit
Browse files Browse the repository at this point in the history
This fixes CVE-2018-18443, the last thread pool provider set into the
pool was not being correctly cleaned up at shutdown of the thread pool.

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd committed Jun 27, 2019
1 parent e4099a6 commit adbc190
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# OpenEXR Release Notes

## Version X.X.X (Some Date)

* Fix CVE-2018-18443, a memory leak in ThreadPool

## Version 2.3.0 (August 13, 2018)

### Features/Improvements:
Expand Down
2 changes: 2 additions & 0 deletions IlmBase/IlmThread/IlmThreadPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,11 @@ ThreadPool::Data::~Data()
{
#ifdef ILMBASE_FORCE_CXX03
provider->finish();
delete provider;
#else
ThreadPoolProvider *p = provider.load( std::memory_order_relaxed );
p->finish();
delete p;
#endif
}

Expand Down

0 comments on commit adbc190

Please sign in to comment.