changeset 12693:915a4bfa6de4

8179536: Cleaner print job handling Reviewed-by: serb, mschoene, rhalade
author prr
date Tue, 09 May 2017 13:28:14 -0700
parents 815506f82fc7
children 8f2521692d9f
files src/windows/native/sun/windows/WPrinterJob.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/WPrinterJob.cpp	Fri Apr 28 12:01:09 2017 -0700
+++ b/src/windows/native/sun/windows/WPrinterJob.cpp	Tue May 09 13:28:14 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);