提交 4181519a 编写于 作者: P prr

8073699: Memory leak in jdk/src/java/desktop/share/native/libjavajpeg/imageioJPEG.c

Reviewed-by: bae, serb
上级 4df4cab7
......@@ -2778,6 +2778,14 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage
pb = &data->pixelBuf;
if (setPixelBuffer(env, pb, buffer) == NOT_OK) {
if (scale != NULL) {
for (i = 0; i < numBands; i++) {
if (scale[i] != NULL) {
free(scale[i]);
}
}
free(scale);
}
return data->abortFlag; // We already threw an out of memory exception
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册