check correct pointer before freeing it (Coverity CID 79,86)
This commit is contained in:
parent
c971ca4c86
commit
442cbb062d
@ -117,7 +117,7 @@ static int dh_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
if (pubkey)
|
if (public_key)
|
||||||
ASN1_INTEGER_free(public_key);
|
ASN1_INTEGER_free(public_key);
|
||||||
if (dh)
|
if (dh)
|
||||||
DH_free(dh);
|
DH_free(dh);
|
||||||
|
@ -123,7 +123,7 @@ static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
if (pubkey)
|
if (public_key)
|
||||||
ASN1_INTEGER_free(public_key);
|
ASN1_INTEGER_free(public_key);
|
||||||
if (dsa)
|
if (dsa)
|
||||||
DSA_free(dsa);
|
DSA_free(dsa);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user