ref: 56fc4c6af35f144369ff6986d69c0395df9db519
parent: 496f3a0cfc69e1b93422993b10968173efe156a7
author: Sebastian Rasmussen <[email protected]>
date: Sun Apr 8 16:33:33 EDT 2018
jbig2dec: Remember to free halftone GB_stats in case of error.
--- a/jbig2_halftone.c
+++ b/jbig2_halftone.c
@@ -609,6 +609,7 @@
code = jbig2_decode_halftone_region(ctx, segment, ¶ms, segment_data + offset, segment->data_length - offset, image, GB_stats);
if (code < 0) {
jbig2_image_release(ctx, image);
+ jbig2_free(ctx->allocator, GB_stats);
return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number, "unable to decode halftone region");
}