mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8215411: some GetByteArrayElements calls miss corresponding Release
Reviewed-by: dholmes, jcbeyler
This commit is contained in:
parent
556d79b518
commit
e4b1f82bbd
3 changed files with 18 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -578,13 +578,15 @@ JNF_COCOA_ENTER(env);
|
|||
cssmPerror("_addItemToKeychain: SecKeychainItemImport", err);
|
||||
}
|
||||
|
||||
(*env)->ReleaseByteArrayElements(env, rawDataObj, rawData, JNI_ABORT);
|
||||
|
||||
if (createdItems != NULL) {
|
||||
CFRelease(createdItems);
|
||||
}
|
||||
|
||||
errOut:
|
||||
if (rawData) {
|
||||
(*env)->ReleaseByteArrayElements(env, rawDataObj, rawData, JNI_ABORT);
|
||||
}
|
||||
|
||||
if (passwordStrRef) CFRelease(passwordStrRef);
|
||||
if (passwordChars) {
|
||||
// clear the password and release
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue