From: Nils Larsch Date: Sat, 18 Mar 2006 14:22:20 +0000 (+0000) Subject: remove unnecessary code X-Git-Tag: OpenSSL_0_9_8k^2~1498 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=33af4421f2ae5e4d0da3a121f51820f4b49a724c;p=oweals%2Fopenssl.git remove unnecessary code --- diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c index 9d90178006..7a66bcebb5 100644 --- a/crypto/dsa/dsa_ossl.c +++ b/crypto/dsa/dsa_ossl.c @@ -285,7 +285,6 @@ err: BN_clear_free(r); } if (ctx_in == NULL) BN_CTX_free(ctx); - if (kinv != NULL) BN_clear_free(kinv); BN_clear_free(&k); BN_clear_free(&kq); return(ret); diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 0147f3e02a..2a02ab0793 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -305,7 +305,7 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) goto ecerr; } priv_key = EC_KEY_get0_private_key(eckey); - if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) + if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) { EC_POINT_free(pub_key); EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); @@ -321,12 +321,8 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) } EVP_PKEY_assign_EC_KEY(pkey, eckey); - if (ctx) - BN_CTX_free(ctx); break; ecerr: - if (ctx) - BN_CTX_free(ctx); if (eckey) EC_KEY_free(eckey); if (pkey) diff --git a/engines/e_4758cca.c b/engines/e_4758cca.c index 6bab385435..a9089498cc 100644 --- a/engines/e_4758cca.c +++ b/engines/e_4758cca.c @@ -482,8 +482,6 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id, err: if (keyToken) OPENSSL_free(keyToken); - if (rtmp) - RSA_free(rtmp); return NULL; } @@ -558,8 +556,6 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id, err: if (keyToken) OPENSSL_free(keyToken); - if (rtmp) - RSA_free(rtmp); return NULL; } diff --git a/engines/e_chil.c b/engines/e_chil.c index 3d75681396..04f2a535de 100644 --- a/engines/e_chil.c +++ b/engines/e_chil.c @@ -852,8 +852,6 @@ static EVP_PKEY *hwcrhk_load_privkey(ENGINE *eng, const char *key_id, return res; err: - if (res) - EVP_PKEY_free(res); #ifndef OPENSSL_NO_RSA if (rtmp) RSA_free(rtmp); diff --git a/engines/e_sureware.c b/engines/e_sureware.c index 58fa9a98ee..cd0fa4c397 100644 --- a/engines/e_sureware.c +++ b/engines/e_sureware.c @@ -758,8 +758,6 @@ static EVP_PKEY* sureware_load_public(ENGINE *e,const char *key_id,char *hptr,un } return res; err: - if (res) - EVP_PKEY_free(res); #ifndef OPENSSL_NO_RSA if (rsatmp) RSA_free(rsatmp);