summaryrefslogtreecommitdiff
path: root/poppler/JPEG2000Stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/JPEG2000Stream.cc')
-rw-r--r--poppler/JPEG2000Stream.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index d20fa417..2b6af900 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -501,6 +501,7 @@ void JPXStreamPrivate::init2(OPJ_CODEC_FORMAT format, unsigned char *buf, int le
return;
error:
+ opj_stream_destroy(stream);
opj_destroy_codec(decoder);
if (format == OPJ_CODEC_JP2) {
error(errSyntaxWarning, -1, "Did no succeed opening JPX Stream as JP2, trying as J2K.");