diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcodec/codec/fx_codec_jpeg.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 6e227ca20e..71a2f8889e 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -419,8 +419,10 @@ CJpegContext::~CJpegContext() { std::unique_ptr<CCodec_JpegModule::Context> CCodec_JpegModule::Start() { // Use ordinary pointer until past the possibility of a longjump. auto* pContext = new CJpegContext(); - if (setjmp(pContext->m_JumpMark) == -1) + if (setjmp(pContext->m_JumpMark) == -1) { + delete pContext; return nullptr; + } jpeg_create_decompress(&pContext->m_Info); pContext->m_Info.src = &pContext->m_SrcMgr; |