From: Geoff Thorpe Date: Fri, 9 Jun 2000 11:42:02 +0000 (+0000) Subject: * Migrate the engine code's Malloc + Free calls to the newer X-Git-Tag: OpenSSL-engine-0_9_6-beta1~64 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=05d909c5498c85e54417ce8ad9bc60365d9cbbd7;p=oweals%2Fopenssl.git * 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. --- diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index 2eedad6c38..66803b5565 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -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; } } diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c index c91ff00d1e..b31b946ad3 100644 --- a/crypto/dsa/dsa_lib.c +++ b/crypto/dsa/dsa_lib.c @@ -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; } } diff --git a/crypto/engine/engine_list.c b/crypto/engine/engine_list.c index 484e89c8f8..171540e1a6 100644 --- a/crypto/engine/engine_list.c +++ b/crypto/engine/engine_list.c @@ -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; } diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index 55b4a82dee..5e1e8fcdf3 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -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; } }