8013446: [parfait] Memory leak in jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c
Reviewed-by: bae, prr
--- a/jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c Thu Aug 15 11:56:33 2013 -0700
+++ b/jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c Fri Aug 16 15:57:28 2013 +0400
@@ -67,12 +67,13 @@
J2dTraceLn(J2D_TRACE_INFO, "WGLSurfaceData_initOps");
- if (oglsdo == NULL) {
- JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
+ if (wglsdo == NULL) {
+ JNU_ThrowOutOfMemoryError(env, "creating native wgl ops");
return;
}
- if (wglsdo == NULL) {
- JNU_ThrowOutOfMemoryError(env, "creating native wgl ops");
+ if (oglsdo == NULL) {
+ free(wglsdo);
+ JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}