diff options
author | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-06-01 22:19:21 +0000 |
commit | 26a3a48d65c7464b400ec1de439994d7f0d25fed (patch) | |
tree | 91abb7d351b174e58f60e5353b731b916eaf0c5c /crypto/dh | |
parent | de42b6a7a82be33d2976ab605e74d7bc95b71447 (diff) | |
download | openssl-new-26a3a48d65c7464b400ec1de439994d7f0d25fed.tar.gz |
There have been a number of complaints from a number of sources that names
like Malloc, Realloc and especially Free conflict with already existing names
on some operating systems or other packages. That is reason enough to change
the names of the OpenSSL memory allocation macros to something that has a
better chance of being unique, like prepending them with OPENSSL_.
This change includes all the name changes needed throughout all C files.
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_lib.c | 8 | ||||
-rw-r--r-- | crypto/dh/dhtest.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index be00ceee2f..a8d5340bf4 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -96,7 +96,7 @@ DH *DH_new(void) DH *DH_new_method(DH_METHOD *meth) { DH *ret; - ret=(DH *)Malloc(sizeof(DH)); + ret=(DH *)OPENSSL_malloc(sizeof(DH)); if (ret == NULL) { @@ -122,7 +122,7 @@ DH *DH_new_method(DH_METHOD *meth) ret->flags=ret->meth->flags; if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { - Free(ret); + OPENSSL_free(ret); ret=NULL; } else @@ -155,11 +155,11 @@ void DH_free(DH *r) if (r->g != NULL) BN_clear_free(r->g); if (r->q != NULL) BN_clear_free(r->q); if (r->j != NULL) BN_clear_free(r->j); - if (r->seed) Free(r->seed); + if (r->seed) OPENSSL_free(r->seed); if (r->counter != NULL) BN_clear_free(r->counter); if (r->pub_key != NULL) BN_clear_free(r->pub_key); if (r->priv_key != NULL) BN_clear_free(r->priv_key); - Free(r); + OPENSSL_free(r); } int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, diff --git a/crypto/dh/dhtest.c b/crypto/dh/dhtest.c index d66c28455e..f0151253d7 100644 --- a/crypto/dh/dhtest.c +++ b/crypto/dh/dhtest.c @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) BIO_puts(out,"\n"); alen=DH_size(a); - abuf=(unsigned char *)Malloc(alen); + abuf=(unsigned char *)OPENSSL_malloc(alen); aout=DH_compute_key(abuf,b->pub_key,a); BIO_puts(out,"key1 ="); @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) BIO_puts(out,"\n"); blen=DH_size(b); - bbuf=(unsigned char *)Malloc(blen); + bbuf=(unsigned char *)OPENSSL_malloc(blen); bout=DH_compute_key(bbuf,a->pub_key,b); BIO_puts(out,"key2 ="); @@ -170,8 +170,8 @@ int main(int argc, char *argv[]) else ret=0; err: - if (abuf != NULL) Free(abuf); - if (bbuf != NULL) Free(bbuf); + if (abuf != NULL) OPENSSL_free(abuf); + if (bbuf != NULL) OPENSSL_free(bbuf); if(b != NULL) DH_free(b); if(a != NULL) DH_free(a); BIO_free(out); |