summaryrefslogtreecommitdiffstats
path: root/crypto/dso
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/dso
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/dso')
-rw-r--r--crypto/dso/dso_lib.c8
-rw-r--r--crypto/dso/dso_win32.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index f41ebf1aa4..861f5fb84e 100644
--- a/crypto/dso/dso_lib.c
+++ b/crypto/dso/dso_lib.c
@@ -100,7 +100,7 @@ DSO *DSO_new_method(DSO_METHOD *meth)
* to stealing the "best available" method. Will fallback
* to DSO_METH_null() in the worst case. */
default_DSO_meth = DSO_METHOD_openssl();
- ret = (DSO *)Malloc(sizeof(DSO));
+ ret = (DSO *)OPENSSL_malloc(sizeof(DSO));
if(ret == NULL)
{
DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE);
@@ -112,7 +112,7 @@ DSO *DSO_new_method(DSO_METHOD *meth)
{
/* sk_new doesn't generate any errors so we do */
DSOerr(DSO_F_DSO_NEW_METHOD,ERR_R_MALLOC_FAILURE);
- Free(ret);
+ OPENSSL_free(ret);
return(NULL);
}
if(meth == NULL)
@@ -122,7 +122,7 @@ DSO *DSO_new_method(DSO_METHOD *meth)
ret->references = 1;
if((ret->meth->init != NULL) && !ret->meth->init(ret))
{
- Free(ret);
+ OPENSSL_free(ret);
ret=NULL;
}
return(ret);
@@ -165,7 +165,7 @@ int DSO_free(DSO *dso)
sk_free(dso->meth_data);
- Free(dso);
+ OPENSSL_free(dso);
return(1);
}
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index 212a255b4b..e204b6b07b 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -133,19 +133,19 @@ static int win32_load(DSO *dso, const char *filename)
DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED);
return(0);
}
- p = (HINSTANCE *)Malloc(sizeof(HINSTANCE));
+ p = (HINSTANCE *)OPENSSL_malloc(sizeof(HINSTANCE));
if(p == NULL)
{
DSOerr(DSO_F_WIN32_LOAD,ERR_R_MALLOC_FAILURE);
- FreeLibrary(h);
+ OPENSSL_freeLibrary(h);
return(0);
}
*p = h;
if(!sk_push(dso->meth_data, (char *)p))
{
DSOerr(DSO_F_WIN32_LOAD,DSO_R_STACK_ERROR);
- FreeLibrary(h);
- Free(p);
+ OPENSSL_freeLibrary(h);
+ OPENSSL_free(p);
return(0);
}
return(1);
@@ -167,7 +167,7 @@ static int win32_unload(DSO *dso)
DSOerr(DSO_F_WIN32_UNLOAD,DSO_R_NULL_HANDLE);
return(0);
}
- if(!FreeLibrary(p))
+ if(!OPENSSL_freeLibrary(p))
{
DSOerr(DSO_F_WIN32_UNLOAD,DSO_R_UNLOAD_FAILED);
/* We should push the value back onto the stack in
@@ -176,7 +176,7 @@ static int win32_unload(DSO *dso)
return(0);
}
/* Cleanup */
- Free(p);
+ OPENSSL_free(p);
return(1);
}