Skip to content

Commit ec735aa

Browse files
committed
Fix warning about deallocate(capacity:) deprecation
1 parent 398c825 commit ec735aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/JWA/HMAC/HMACCommonCrypto.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import CommonCrypto
55
extension HMACAlgorithm: SignAlgorithm, VerifyAlgorithm {
66
public func sign(_ message: Data) -> Data {
77
let context = UnsafeMutablePointer<CCHmacContext>.allocate(capacity: 1)
8-
defer { context.deallocate(capacity: 1) }
8+
defer { context.deallocate() }
99

1010
key.withUnsafeBytes() { (buffer: UnsafePointer<UInt8>) in
1111
CCHmacInit(context, hash.commonCryptoAlgorithm, buffer, size_t(key.count))

0 commit comments

Comments
 (0)