From ae9968868e542b2a5a2064aff1e44b963460cb1e Mon Sep 17 00:00:00 2001 From: jchen Date: Wed, 24 Jul 2013 12:40:26 -0700 Subject: [PATCH] 8011709: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp Reviewed-by: jgodinez, prr --- src/share/native/sun/font/layout/CanonShaping.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/share/native/sun/font/layout/CanonShaping.cpp b/src/share/native/sun/font/layout/CanonShaping.cpp index 86f2ebc89..be011b10f 100644 --- a/src/share/native/sun/font/layout/CanonShaping.cpp +++ b/src/share/native/sun/font/layout/CanonShaping.cpp @@ -66,6 +66,16 @@ void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le 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; -- GitLab