]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pkcs11: Fix cleanup when verifying signature fails because scheme isn't supported
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Mar 2024 12:56:21 +0000 (13:56 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Mar 2024 12:58:02 +0000 (13:58 +0100)
Fixes: 49769fff53f3 ("pkcs11: Support RSA-PSS signatures")
src/libstrongswan/plugins/pkcs11/pkcs11_public_key.c

index 2298be16ea2f01678dfeaf20ca1846ebe183d01a..1f06f83965d0544eadb2258de6b950cfdcc7786d 100644 (file)
@@ -307,7 +307,10 @@ METHOD(public_key_t, verify, bool,
        success = TRUE;
 
 end:
-       free(mechanism->pParameter);
+       if (mechanism)
+       {
+               free(mechanism->pParameter);
+       }
        free(mechanism);
        return success;
 }