Skip to content

Commit

Permalink
Fix memleak in OpenEXR lib [IMAGE-00]
Browse files Browse the repository at this point in the history
 Direct leak of 8 byte(s) in 1 object(s) allocated from:
     #0 0x5d9c7f in operator new(unsigned long) (/home/pgrunt/src/image_flat/build_asan/iface/unit_tests/iface_unittest+0x5d9c7f)
     opencv#1 0x7fa5e5fbce7a in IlmThread_opencv::ThreadPool::ThreadPool(unsigned int) /home/pgrunt/src/image_flat/ext_libs/opencv/3rdparty/openexr/IlmThread/IlmThreadPool.cpp:758:29
     opencv#2 0x7fa5e5fbce7a in IlmThread_opencv::ThreadPool::globalThreadPool() /home/pgrunt/src/image_flat/ext_libs/opencv/3rdparty/openexr/IlmThread/IlmThreadPool.cpp:838

Taken from AcademySoftwareFoundation/openexr#412
  • Loading branch information
kdt3rd authored and xerus committed Sep 13, 2019
1 parent 4b0526a commit ac3a80f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3rdparty/openexr/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 ac3a80f

Please sign in to comment.