PR: 2124
Submitted by: Jan Pechanec <Jan.Pechanec@Sun.COM> Check for memory allocation failures.
This commit is contained in:
@@ -182,7 +182,16 @@ RSA *RSA_new_method(ENGINE *engine)
|
||||
ret->mt_blinding=NULL;
|
||||
ret->bignum_data=NULL;
|
||||
ret->flags=ret->meth->flags;
|
||||
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
|
||||
if (ret->engine)
|
||||
ENGINE_finish(ret->engine);
|
||||
#endif
|
||||
OPENSSL_free(ret);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
|
||||
{
|
||||
#ifndef OPENSSL_NO_ENGINE
|
||||
|
Reference in New Issue
Block a user