Merge pull request #835 from lovell/fix-jpegsave-buffer-error-leak

Prevent ~15KB leak for JPEG buffer output error
This commit is contained in:
John Cupitt 2017-12-19 08:26:55 +00:00 committed by GitHub
commit ce2ec4cf01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -816,6 +816,9 @@ vips__jpeg_write_buffer( VipsImage *in,
Q, profile, optimize_coding, progressive, strip, no_subsample,
trellis_quant, overshoot_deringing, optimize_scans,
quant_table ) ) {
term_destination( &write->cinfo );
VIPS_FREE( *obuf );
*olen = 0;
write_destroy( write );
return( -1 );