fix a small memleak in jpeg decoding

This commit is contained in:
houzh 2023-12-07 16:30:56 +08:00
parent b38f04a3ec
commit 6c7de059ba

View File

@ -366,6 +366,8 @@ struct decoder_error_mgr {
static void handle_jpeg_error(j_common_ptr cinfo) {
struct decoder_error_mgr *err = (struct decoder_error_mgr*)(cinfo->err);
jpeg_finish_decompress((j_decompress_ptr)cinfo);
jpeg_destroy_decompress((j_decompress_ptr)cinfo);
longjmp(err->setjmp_buffer, 1);
LOGE("JPEG read/write error");
}