From 8c7bb1bbcfa79a85a94f531e12e68fd529688e9a Mon Sep 17 00:00:00 2001 From: Aleksandar Vacic Date: Mon, 17 Sep 2018 23:38:34 +0200 Subject: [PATCH] Applied recommendation from Xcode 10 --- Sources/JWT/HMACCommonCrypto.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))