diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index 0ff0fe7f3bc4d5100d4497808f94285d74733d43..420cfcda34b83987e5c2d499458d95c4b226422e 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -117,7 +117,7 @@ static int dh_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) return 1; err: - if (pubkey) + if (public_key) ASN1_INTEGER_free(public_key); if (dh) DH_free(dh); diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c index fab5d55f76470669af5f32e08e87c16a8dd6367d..be91821dda13068bb35390ffe320fb81cab6f933 100644 --- a/crypto/dsa/dsa_ameth.c +++ b/crypto/dsa/dsa_ameth.c @@ -123,7 +123,7 @@ static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) return 1; err: - if (pubkey) + if (public_key) ASN1_INTEGER_free(public_key); if (dsa) DSA_free(dsa);