8181139: Memory leak in awt_Font.cpp / AwtFont::Create

Reviewed-by: serb, ssadetsky
This commit is contained in:
Phil Race 2017-11-13 12:10:49 -08:00
parent f71993d642
commit 71d1941f5a

@ -283,6 +283,7 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale)
// Ask peer class for the text component font name
jstring jTextComponentFontName = GetTextComponentFontName(env, font);
if (jTextComponentFontName == NULL) {
delete awtFont;
return NULL;
}
LPCWSTR textComponentFontName = JNU_GetStringPlatformChars(env, jTextComponentFontName, NULL);