8013446: [parfait] Memory leak in jdk/src/windows/native/sun/java2d/opengl/WGLSurfaceData.c

Reviewed-by: bae, prr
This commit is contained in:
Vadim Pakhnushev 2013-08-16 15:57:28 +04:00
parent bce847b2be
commit f09520a064

View File

@ -67,14 +67,15 @@ Java_sun_java2d_opengl_WGLSurfaceData_initOps(JNIEnv *env, jobject wglsd,
J2dTraceLn(J2D_TRACE_INFO, "WGLSurfaceData_initOps");
if (oglsdo == NULL) {
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}
if (wglsdo == NULL) {
JNU_ThrowOutOfMemoryError(env, "creating native wgl ops");
return;
}
if (oglsdo == NULL) {
free(wglsdo);
JNU_ThrowOutOfMemoryError(env, "Initialization of SurfaceData failed.");
return;
}
oglsdo->privOps = wglsdo;