8151110: libfontmanager should free memory with delete[] if it was allocated with new[]
Reviewed-by: prr, serb
--- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc Thu Mar 17 11:23:31 2016 +0530
+++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc Thu Mar 17 12:48:25 2016 +0530
@@ -293,7 +293,7 @@
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,