mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8228578: fix CFData object leak in macosx KeystoreImpl.m
Reviewed-by: weijun
This commit is contained in:
parent
d3fa36896e
commit
4449a99f84
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2019, 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
|
||||
|
@ -562,6 +562,9 @@ JNF_COCOA_ENTER(env);
|
|||
|
||||
err = SecKeychainItemImport(cfDataToImport, NULL, &dataFormat, NULL,
|
||||
0, ¶mBlock, defaultKeychain, &createdItems);
|
||||
if (cfDataToImport != NULL) {
|
||||
CFRelease(cfDataToImport);
|
||||
}
|
||||
|
||||
if (err == noErr) {
|
||||
SecKeychainItemRef anItem = (SecKeychainItemRef)CFArrayGetValueAtIndex(createdItems, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue