Ensure jpeg exception object doesn't leak
This commit is contained in:
parent
ae7409b062
commit
93458e4cb3
1 changed files with 2 additions and 2 deletions
|
|
@ -1258,7 +1258,7 @@ bool IsProgressiveJpeg(const QByteArray &bytes) {
|
|||
info.err = jpeg_std_error(&jerr);
|
||||
jerr.error_exit = [](j_common_ptr cinfo) {
|
||||
(*cinfo->err->output_message)(cinfo);
|
||||
throw new std::exception;
|
||||
throw std::exception();
|
||||
};
|
||||
|
||||
jpeg_create_decompress(&info);
|
||||
|
|
@ -1290,7 +1290,7 @@ QByteArray MakeProgressiveJpeg(const QByteArray &bytes) {
|
|||
dstinfo.err = jpeg_std_error(&jerr);
|
||||
jerr.error_exit = [](j_common_ptr cinfo) {
|
||||
(*cinfo->err->output_message)(cinfo);
|
||||
throw new std::exception;
|
||||
throw std::exception();
|
||||
};
|
||||
|
||||
jpeg_create_decompress(&srcinfo);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue