Function

SecKeychainItemFreeContent

Releases the memory used by the keychain attribute list and the keychain data retrieved in a call to the SecKeychainItemCopyContent function.

Declaration

OSStatus SecKeychainItemFreeContent(SecKeychainAttributeList *attrList, void *data);

Parameters

attrList

A pointer to the attribute list to release. Pass NULL if there is no attribute list to release.

data

A pointer to the data buffer to release. Pass NULL if there is no data to release.

Return Value

Discussion

Because the SecKeychainFindInternetPassword and SecKeychainFindGenericPassword functions call the SecKeychainItemCopyContent function, you must call SecKeychainItemFreeContent to release the data buffers after calls to those functions as well.

Because the SecKeychainItemCopyContent function does not allocate buffers until they are needed, you should not call the SecKeychainItemFreeContent function unless data is actually returned to you.

See Also

Legacy Keychain Item Management

SecKeychainItemCopyAttributesAndData

Retrieves the data and/or attributes stored in the given keychain item.

SecKeychainItemModifyAttributesAndData

Updates an existing keychain item after changing its attributes or data.

SecKeychainItemFreeAttributesAndData

Releases the memory used by the keychain attribute list and/or the keychain data retrieved in a call to SecKeychainItemCopyAttributesAndData.

SecKeychainItemCopyContent

Copies the data and attributes stored in the given keychain item.

SecKeychainItemModifyContent

Updates an existing keychain item after changing its attributes and/or data.

SecKeychainItemCopyKeychain

Returns the keychain object of a given keychain item.

SecKeychainItemDelete

Deletes a keychain item from the default keychain’s permanent data store.

SecKeychainAttrType

The keychain attribute type.

SecKeychainAttribute

A structure that holds a single keychain attribute.

SecKeychainAttributePtr

A pointer to a keychain attribute structure.

SecKeychainAttributeList

A list of keychain attributes.