Skip to content

Commit

Permalink
Deinitialise correct pointer (#158)
Browse files Browse the repository at this point in the history
Update RSA key to deinit correct pointer
  • Loading branch information
ptoffy committed Apr 15, 2024
1 parent e05513b commit ee06dd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/JWTKit/RSA/RSAKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public final class RSAKey: OpenSSLKey {
internal var c: OpaquePointer {
return CJWTKitBoringSSL_EVP_PKEY_get1_RSA(self.cRaw)
}

let cRaw: OpaquePointer

init(_ c: OpaquePointer, _ type: KeyType) {
Expand All @@ -186,6 +186,6 @@ public final class RSAKey: OpenSSLKey {
}

deinit {
CJWTKitBoringSSL_EVP_PKEY_free(self.c)
CJWTKitBoringSSL_EVP_PKEY_free(self.cRaw)
}
}

0 comments on commit ee06dd4

Please sign in to comment.