---
title: "SecKeychainItemFreeAttributesAndData(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/seckeychainitemfreeattributesanddata(_:_:)"
---

# SecKeychainItemFreeAttributesAndData(_:_:)

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

## Declaration

```swift
func SecKeychainItemFreeAttributesAndData(_ attrList: UnsafeMutablePointer<SecKeychainAttributeList>?, _ data: UnsafeMutableRawPointer?) -> OSStatus
```

## 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

Return Value A result code. See Security Framework Result Codes.
