--- old/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c 2016-09-26 12:50:49.692875082 +0530 +++ new/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c 2016-09-26 12:50:49.436875082 +0530 @@ -2872,6 +2872,7 @@ if (setjmp(jerr->setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error while writing. */ + RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte)); if (!(*env)->ExceptionOccurred(env)) { char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message) ((j_common_ptr) cinfo,