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/objects/o_names.c | |
parent | de42b6a7a82be33d2976ab605e74d7bc95b71447 (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/objects/o_names.c')
-rw-r--r-- | crypto/objects/o_names.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/objects/o_names.c b/crypto/objects/o_names.c index 67cb7f1837..aa82a8a07c 100644 --- a/crypto/objects/o_names.c +++ b/crypto/objects/o_names.c @@ -90,7 +90,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(), int (*cmp_func)(), for (i=sk_NAME_FUNCS_num(name_funcs_stack); i<names_type_num; i++) { MemCheck_off(); - name_funcs = Malloc(sizeof(NAME_FUNCS)); + name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); name_funcs->hash_func = lh_strhash; name_funcs->cmp_func = (int (*)())strcmp; name_funcs->free_func = 0; /* NULL is often declared to @@ -187,7 +187,7 @@ int OBJ_NAME_add(const char *name, int type, const char *data) alias=type&OBJ_NAME_ALIAS; type&= ~OBJ_NAME_ALIAS; - onp=(OBJ_NAME *)Malloc(sizeof(OBJ_NAME)); + onp=(OBJ_NAME *)OPENSSL_malloc(sizeof(OBJ_NAME)); if (onp == NULL) { /* ERROR */ @@ -212,7 +212,7 @@ int OBJ_NAME_add(const char *name, int type, const char *data) sk_NAME_FUNCS_value(name_funcs_stack,ret->type) ->free_func(ret->name,ret->type,ret->data); } - Free(ret); + OPENSSL_free(ret); } else { @@ -247,7 +247,7 @@ int OBJ_NAME_remove(const char *name, int type) sk_NAME_FUNCS_value(name_funcs_stack,ret->type) ->free_func(ret->name,ret->type,ret->data); } - Free(ret); + OPENSSL_free(ret); return(1); } else @@ -269,7 +269,7 @@ static void names_lh_free(OBJ_NAME *onp, int type) static void name_funcs_free(NAME_FUNCS *ptr) { - Free(ptr); + OPENSSL_free(ptr); } void OBJ_NAME_cleanup(int type) |