Skip to content

Commit

Permalink
use constructor semantics to zero init the context pointer, avoid one…
Browse files Browse the repository at this point in the history
… memory sanitizer warning

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd committed Sep 16, 2024
1 parent 6646638 commit 7205abd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/OpenEXR/ImfContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,11 @@ class MemAttrStream : public OPENEXR_IMF_NAMESPACE::IStream
////////////////////////////////////////

Context::Context ()
: _ctxt (new exr_context_t, [] (exr_context_t* todel) {
: _ctxt (new exr_context_t(), [] (exr_context_t* todel) {
exr_finish (todel);
delete todel;
})
{
*_ctxt = nullptr;
}

////////////////////////////////////////
Expand Down

0 comments on commit 7205abd

Please sign in to comment.