Fix small memory leak on decompression.
authorCarl Hetherington <cth@carlh.net>
Fri, 1 Nov 2013 15:52:30 +0000 (15:52 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 1 Nov 2013 15:52:30 +0000 (15:52 +0000)
src/util.cc

index 26fe1b5e9de244db41a816edbdda89b30d95e2c6..5907851156c9ff7603e6d5ba96a2de8a99551aa5 100644 (file)
@@ -212,6 +212,7 @@ libdcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
                boost::throw_exception (DCPReadError ("could not decode JPEG2000 codestream of " + lexical_cast<string> (size) + " bytes."));
        }
 
+       opj_destroy_decompress (decoder);
        opj_cio_close (cio);
 
        image->x1 = rint (float(image->x1) / pow (2, reduce));