8179533: Cleaner print job handling

Reviewed-by: serb, mschoene, rhalade
This commit is contained in:
Phil Race 2017-05-17 14:52:09 -07:00
parent bb2e7a3311
commit fdb4198336

View File

@ -508,14 +508,14 @@ jobjectArray getAllDCNames(JNIEnv *env, jobject peer, jstring printer,
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);