src/solaris/native/sun/awt/awt_Font.c
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File jdk Cdiff src/solaris/native/sun/awt/awt_Font.c

src/solaris/native/sun/awt/awt_Font.c

Print this page

        

*** 450,459 **** --- 450,460 ---- if (!JNU_IsNull(env, font) && awtJNI_IsMultiFont(env, font)) { struct FontData *fdata = NULL; int32_t i, size; char *fontsetname = NULL; char *nativename = NULL; + Boolean doFree = FALSE; jobjectArray componentFonts = NULL; jobject peer = NULL; jobject fontDescriptor = NULL; jstring fontDescriptorName = NULL; jstring charsetName = NULL;
*** 489,508 **** (*env)->GetObjectField(env, fontDescriptor, fontDescriptorIDs.nativeName); if (!JNU_IsNull(env, fontDescriptorName)) { nativename = (char *) JNU_GetStringPlatformChars(env, fontDescriptorName, NULL); } else { nativename = ""; } fdata->flist[i].xlfd = malloc(strlen(nativename) + strlen(defaultXLFD)); jio_snprintf(fdata->flist[i].xlfd, strlen(nativename) + 10, nativename, size * 10); ! if (nativename != NULL && nativename != "") JNU_ReleaseStringPlatformChars(env, fontDescriptorName, (const char *) nativename); /* * set charset_name */ --- 490,511 ---- (*env)->GetObjectField(env, fontDescriptor, fontDescriptorIDs.nativeName); if (!JNU_IsNull(env, fontDescriptorName)) { nativename = (char *) JNU_GetStringPlatformChars(env, fontDescriptorName, NULL); + doFree = TRUE; } else { nativename = ""; + doFree = FALSE; } fdata->flist[i].xlfd = malloc(strlen(nativename) + strlen(defaultXLFD)); jio_snprintf(fdata->flist[i].xlfd, strlen(nativename) + 10, nativename, size * 10); ! if (nativename != NULL && doFree) JNU_ReleaseStringPlatformChars(env, fontDescriptorName, (const char *) nativename); /* * set charset_name */
src/solaris/native/sun/awt/awt_Font.c
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File