diff --git a/Sources/JWT/HMACCommonCrypto.swift b/Sources/JWT/HMACCommonCrypto.swift index a144ccb..ef8dc1c 100644 --- a/Sources/JWT/HMACCommonCrypto.swift +++ b/Sources/JWT/HMACCommonCrypto.swift @@ -29,7 +29,7 @@ extension HMACAlgorithm { func hmac(algorithm: HMACAlgorithm, key: Data, message: Data) -> Data { let context = UnsafeMutablePointer.allocate(capacity: 1) - defer { context.deallocate(capacity: 1) } + defer { context.deallocate() } key.withUnsafeBytes() { (buffer: UnsafePointer) in CCHmacInit(context, algorithm.commonCryptoAlgorithm, buffer, size_t(key.count))