8011709: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp
Reviewed-by: jgodinez, prr
--- 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;