diff --git a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc index 194731f4e7e..1727bb80ea3 100644 --- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc +++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc @@ -293,7 +293,7 @@ reference_table(hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data) { return NULL; } length = env->GetArrayLength(tableBytes); - buffer = new jbyte[length]; + buffer = (jbyte *)calloc(length, sizeof(jbyte)); env->GetByteArrayRegion(tableBytes, 0, length, buffer); return hb_blob_create((const char *)buffer, length,