We miss a couple of CFRelease calls in 
Java_apple_security_KeychainStore__1addItemToKeychain in case of early 
errors/returns.
Also a NULL  check after CFDataCreate is recommended.
See 
https://developer.apple.com/documentation/corefoundation/cfdatacreate(_:_:_:)  
about return value and ownership/Create rule.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - JDK-8397903

Changes: https://git.openjdk.org/jdk/pull/33999/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33999&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8397903
  Stats: 8 lines in 1 file changed: 4 ins; 2 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/33999.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33999/head:pull/33999

PR: https://git.openjdk.org/jdk/pull/33999

Reply via email to