summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-09-03 09:15:26 -0400
committerRich Salz <rsalz@openssl.org>2015-09-03 16:26:34 -0400
commit64b25758edca688a30f02c260262150f7ad0bc7d (patch)
tree15ad5a8c7985e2b27aaf7a14737fd980a36349dd /crypto/rsa/rsa_lib.c
parentfb4844bbc62fb014c115cd8fd2fc4304cba6eb89 (diff)
remove 0 assignments.
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/rsa/rsa_lib.c')
-rw-r--r--crypto/rsa/rsa_lib.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index f62fd73147..c64dad45db 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -125,7 +125,7 @@ RSA *RSA_new_method(ENGINE *engine)
{
RSA *ret;
- ret = OPENSSL_malloc(sizeof(*ret));
+ ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
RSAerr(RSA_F_RSA_NEW_METHOD, ERR_R_MALLOC_FAILURE);
return NULL;
@@ -153,23 +153,7 @@ RSA *RSA_new_method(ENGINE *engine)
}
#endif
- ret->pad = 0;
- ret->version = 0;
- ret->n = NULL;
- ret->e = NULL;
- ret->d = NULL;
- ret->p = NULL;
- ret->q = NULL;
- ret->dmp1 = NULL;
- ret->dmq1 = NULL;
- ret->iqmp = NULL;
ret->references = 1;
- ret->_method_mod_n = NULL;
- ret->_method_mod_p = NULL;
- ret->_method_mod_q = NULL;
- ret->blinding = NULL;
- ret->mt_blinding = NULL;
- ret->bignum_data = NULL;
ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
#ifndef OPENSSL_NO_ENGINE