Commit 4382264f authored by Albert Astals Cid's avatar Albert Astals Cid

Fix leak in broken files

oss-fuzz/21330
parent 5c601c40
......@@ -357,6 +357,10 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int le
return;
error:
if (image != nullptr) {
opj_image_destroy(image);
image = nullptr;
}
opj_stream_destroy(stream);
opj_destroy_codec(decoder);
if (format == OPJ_CODEC_JP2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment