changeset 48562:f6796a7e4454

8179533: Cleaner print job handling Reviewed-by: serb, mschoene, rhalade
author prr
date Wed, 17 May 2017 14:52:09 -0700
parents 46e99460e8c9
children 592c141b1ca3
files src/java.desktop/windows/native/libawt/windows/WPrinterJob.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);