Initialize pval.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 31 Mar 2006 18:11:54 +0000 (18:11 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 31 Mar 2006 18:11:54 +0000 (18:11 +0000)
crypto/dsa/dsa_ameth.c

index 9d55665c4a92a48938445a22e9ee3fb3c9e532b8..b9f7a4d687189638f8038e53dd769e6de2536d04 100644 (file)
@@ -123,7 +123,7 @@ static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
 static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
        {
        DSA *dsa;
-       void *pval;
+       void *pval = NULL;
        int ptype;
        unsigned char *penc = NULL;
        int penclen;
@@ -143,10 +143,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
                ptype = V_ASN1_SEQUENCE;
                }
        else
-               {
                ptype = V_ASN1_UNDEF;
-               pval = NULL;
-               }
        dsa->write_params=0;
 
        penclen = i2d_DSAPublicKey(dsa, &penc);