check correct pointer before freeing it (Coverity CID 79,86)
authorNils Larsch <nils@openssl.org>
Mon, 2 Apr 2007 20:29:40 +0000 (20:29 +0000)
committerNils Larsch <nils@openssl.org>
Mon, 2 Apr 2007 20:29:40 +0000 (20:29 +0000)
crypto/dh/dh_ameth.c
crypto/dsa/dsa_ameth.c

index 0ff0fe7..420cfcd 100644 (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);
index fab5d55..be91821 100644 (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);