mirror of https://github.com/openssl/openssl.git
GH715: Missed some null-check-removals.
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
91a61513a8
commit
412bafdcf5
|
@ -154,7 +154,6 @@ RSA *RSA_new_method(ENGINE *engine)
|
||||||
ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
|
ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
|
||||||
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
|
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (ret->engine)
|
|
||||||
ENGINE_finish(ret->engine);
|
ENGINE_finish(ret->engine);
|
||||||
#endif
|
#endif
|
||||||
OPENSSL_free(ret);
|
OPENSSL_free(ret);
|
||||||
|
@ -163,7 +162,6 @@ RSA *RSA_new_method(ENGINE *engine)
|
||||||
|
|
||||||
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
|
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (ret->engine)
|
|
||||||
ENGINE_finish(ret->engine);
|
ENGINE_finish(ret->engine);
|
||||||
#endif
|
#endif
|
||||||
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
|
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data);
|
||||||
|
@ -189,7 +187,6 @@ void RSA_free(RSA *r)
|
||||||
if (r->meth->finish)
|
if (r->meth->finish)
|
||||||
r->meth->finish(r);
|
r->meth->finish(r);
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (r->engine)
|
|
||||||
ENGINE_finish(r->engine);
|
ENGINE_finish(r->engine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue