--- a/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp Fri Apr 28 10:17:46 2017 -0400
+++ b/src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp Wed May 17 14:52:09 2017 -0700
@@ -508,14 +508,14 @@
names = env->NewObjectArray(cReturned, cls, NULL);
}
if (names == NULL || cls == NULL) {
- delete buf;
+ delete[] buf;
return names;
}
for (int i = 0; i < cReturned; i++) {
utf_str = JNU_NewStringPlatform(env, buf+(buf_len*i));
if (utf_str == NULL) {
- delete buf;
+ delete[] buf;
return names;
}
env->SetObjectArrayElement(names, i, utf_str);