* Migrate the engine code's Malloc + Free calls to the newer
authorGeoff Thorpe <geoff@openssl.org>
Fri, 9 Jun 2000 11:42:02 +0000 (11:42 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Fri, 9 Jun 2000 11:42:02 +0000 (11:42 +0000)
  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.

crypto/dh/dh_lib.c
crypto/dsa/dsa_lib.c
crypto/engine/engine_list.c
crypto/rsa/rsa_lib.c

index 2eedad6c38a1308cad80fab11b103468d73c52cc..66803b55656363e9452ed80f79d32006a030f688 100644 (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;
                        }
                }
index c91ff00d1e88ee93d6fae884038cd5b301d70e6f..b31b946ad3b07aac866a80b0def6301830604a8e 100644 (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;
                        }
                }
index 484e89c8f8f2d9c0510449101cab0207eb3e4e06..171540e1a6d309e012a1de8915edce9a7824d7d4 100644 (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;
        }
 
index 55b4a82dee96dd81e17f64a9c65528ffcc96d646..5e1e8fcdf33d53db427b8b802c1b389fcf2ea488 100644 (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;
                        }
                }