# HG changeset patch # User psadhukhan # Date 1458199105 -19800 # Node ID b1b7c1f2ad890ac147523549720d5e8d3e5dbc03 # Parent e36687a004871073514ffea78553d5b7399984c3 8151110: libfontmanager should free memory with delete[] if it was allocated with new[] Reviewed-by: prr, serb diff -r e36687a00487 -r b1b7c1f2ad89 jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc --- 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,