check correct pointer before freeing it (Coverity CID 79,86)

This commit is contained in:
Nils Larsch 2007-04-02 20:29:40 +00:00
parent c971ca4c86
commit 442cbb062d
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);