* Migrate the engine code's Malloc + Free calls to the newer

OPENSSL_malloc and OPENSSL_free.

* 3 "normal" files (crypto/rsa/rsa_lib.c, crypto/dsa/dsa_lib.c
  and crypto/dh/dh_lib.c) had their Malloc's and Free's missed
  when Richard merged the changes across to this branch -
  probably because those files have been changed in this branch
  and gave some grief to the merge - so I've changed them
  manually here.
This commit is contained in:
Geoff Thorpe 2000-06-09 11:42:02 +00:00
parent d44c7dcf00
commit 05d909c549
4 changed files with 6 additions and 6 deletions

View file

@ -148,7 +148,7 @@ DH *DH_new_method(ENGINE *engine)
{
if((ret->engine=ENGINE_get_default_DH()) == NULL)
{
Free(ret);
OPENSSL_free(ret);
return NULL;
}
}

View file

@ -152,7 +152,7 @@ DSA *DSA_new_method(ENGINE *engine)
{
if((ret->engine=ENGINE_get_default_DSA()) == NULL)
{
Free(ret);
OPENSSL_free(ret);
return NULL;
}
}

View file

@ -349,7 +349,7 @@ ENGINE *ENGINE_new(ENGINE *e)
if(e == NULL)
{
ret = (ENGINE *)Malloc(sizeof(ENGINE));
ret = (ENGINE *)(OPENSSL_malloc(sizeof(ENGINE));
if(ret == NULL)
{
ENGINEerr(ENGINE_F_ENGINE_NEW,
@ -370,7 +370,7 @@ ENGINE *ENGINE_new(void)
{
ENGINE *ret;
ret = (ENGINE *)Malloc(sizeof(ENGINE));
ret = (ENGINE *)OPENSSL_malloc(sizeof(ENGINE));
if(ret == NULL)
{
ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE);
@ -406,7 +406,7 @@ int ENGINE_free(ENGINE *e)
}
#endif
if(e->flags & ENGINE_FLAGS_MALLOCED)
Free(e);
OPENSSL_free(e);
return 1;
}

View file

@ -166,7 +166,7 @@ RSA *RSA_new_method(ENGINE *engine)
{
if((ret->engine=ENGINE_get_default_RSA()) == NULL)
{
Free(ret);
OPENSSL_free(ret);
return NULL;
}
}