diff -r 36b30720a997 -r 91e99bed64ae jdk/src/share/native/sun/font/sunFont.c --- a/jdk/src/share/native/sun/font/sunFont.c Tue Feb 26 10:07:26 2013 -0800 +++ b/jdk/src/share/native/sun/font/sunFont.c Thu Mar 07 10:02:20 2013 -0800 @@ -320,22 +320,20 @@ JNIEXPORT TTLayoutTableCache* newLayoutTableCache() { TTLayoutTableCache* ltc = calloc(1, sizeof(TTLayoutTableCache)); if (ltc) { - ltc->gsub_len = -1; - ltc->gpos_len = -1; - ltc->gdef_len = -1; - ltc->mort_len = -1; - ltc->kern_len = -1; + int i; + for(i=0;ientries[i].len = -1; + } } return ltc; } JNIEXPORT void freeLayoutTableCache(TTLayoutTableCache* ltc) { if (ltc) { - if (ltc->gsub) free(ltc->gsub); - if (ltc->gpos) free(ltc->gpos); - if (ltc->gdef) free(ltc->gdef); - if (ltc->mort) free(ltc->mort); - if (ltc->kern) free(ltc->kern); + int i; + for(i=0;ientries[i].ptr) free (ltc->entries[i].ptr); + } if (ltc->kernPairs) free(ltc->kernPairs); free(ltc); }