8179533: Cleaner print job handling
Reviewed-by: serb, mschoene, rhalade
This commit is contained in:
parent
bb2e7a3311
commit
fdb4198336
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user