OpenJDK / zgc / zgc
changeset 19008:f013dabb0bf8
8011709: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp
Reviewed-by: jgodinez, prr
author | jchen |
---|---|
date | Wed, 24 Jul 2013 12:40:26 -0700 |
parents | 1e0c87e7edf7 |
children | 1f1914231324 |
files | jdk/src/share/native/sun/font/layout/CanonShaping.cpp |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp Wed Jul 24 13:38:17 2013 +0400 +++ b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp Wed Jul 24 12:40:26 2013 -0700 @@ -66,6 +66,16 @@ le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount); le_int32 i; + if (combiningClasses == NULL || indices == NULL) { + if (combiningClasses != NULL) { + LE_DELETE_ARRAY(combiningClasses); + } + if (indices != NULL) { + LE_DELETE_ARRAY(indices); + } + return; + } + for (i = 0; i < charCount; i += 1) { combiningClasses[i] = classTable->getGlyphClass(classTable, (LEGlyphID) inChars[i], success); indices[i] = i;