diff --git a/cli/src/ImageReaderSource.cpp b/cli/src/ImageReaderSource.cpp index 5de3c88..4976458 100644 --- a/cli/src/ImageReaderSource.cpp +++ b/cli/src/ImageReaderSource.cpp @@ -75,6 +75,7 @@ Ref ImageReaderSource::create(string const& filename) { char *buffer = reinterpret_cast(jpgd::decompress_jpeg_image_from_file( filename.c_str(), &width, &height, &comps, 4)); image = zxing::ArrayRef(buffer, 4 * width * height); + free(buffer); } if (!image) { ostringstream msg;