Copy and paste error... bn_add_part_words() should of course call
[openssl.git] / crypto / asn1 / d2i_r_pr.c
index 6c8a45f821faf2f2c2622a59f904515318e07c41..46037a04e639b2c950735620137396f1152fa348 100644 (file)
@@ -75,7 +75,7 @@ ASN1_METHOD *RSAPrivateKey_asn1_meth(void)
        return(&method);
        }
 
-RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length)
+RSA *d2i_RSAPrivateKey(RSA **a, const unsigned char **pp, long length)
        {
        int i=ASN1_R_PARSING;
        ASN1_INTEGER *bs=NULL;
@@ -108,6 +108,7 @@ RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length)
                goto err_bn;
 
        M_ASN1_INTEGER_free(bs);
+       bs = NULL;
 
        M_ASN1_D2I_Finish_2(a);
 err_bn: