summaryrefslogtreecommitdiffstats
path: root/crypto/buffer
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-06-01 22:19:21 +0000
committerRichard Levitte <levitte@openssl.org>2000-06-01 22:19:21 +0000
commit26a3a48d65c7464b400ec1de439994d7f0d25fed (patch)
tree91abb7d351b174e58f60e5353b731b916eaf0c5c /crypto/buffer
parentde42b6a7a82be33d2976ab605e74d7bc95b71447 (diff)
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/buffer')
-rw-r--r--crypto/buffer/buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index c3a108ea52..b76ff3ad7a 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -64,7 +64,7 @@ BUF_MEM *BUF_MEM_new(void)
{
BUF_MEM *ret;
- ret=Malloc(sizeof(BUF_MEM));
+ ret=OPENSSL_malloc(sizeof(BUF_MEM));
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
@@ -84,9 +84,9 @@ void BUF_MEM_free(BUF_MEM *a)
if (a->data != NULL)
{
memset(a->data,0,(unsigned int)a->max);
- Free(a->data);
+ OPENSSL_free(a->data);
}
- Free(a);
+ OPENSSL_free(a);
}
int BUF_MEM_grow(BUF_MEM *str, int len)
@@ -107,9 +107,9 @@ int BUF_MEM_grow(BUF_MEM *str, int len)
}
n=(len+3)/3*4;
if (str->data == NULL)
- ret=Malloc(n);
+ ret=OPENSSL_malloc(n);
else
- ret=Realloc(str->data,n);
+ ret=OPENSSL_realloc(str->data,n);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
@@ -132,7 +132,7 @@ char *BUF_strdup(const char *str)
if (str == NULL) return(NULL);
n=strlen(str);
- ret=Malloc(n+1);
+ ret=OPENSSL_malloc(n+1);
if (ret == NULL)
{
BUFerr(BUF_F_BUF_STRDUP,ERR_R_MALLOC_FAILURE);