From: Nils Larsch Date: Mon, 2 Apr 2007 20:29:40 +0000 (+0000) Subject: check correct pointer before freeing it (Coverity CID 79,86) X-Git-Tag: OpenSSL_0_9_8k^2~919 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=442cbb062d82ff95a391946b9a15507df2add87a;p=oweals%2Fopenssl.git check correct pointer before freeing it (Coverity CID 79,86) --- diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index 0ff0fe7f3b..420cfcda34 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 fab5d55f76..be91821dda 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);