summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_object.c
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/asn1/a_object.c
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/asn1/a_object.c')
-rw-r--r--crypto/asn1/a_object.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c
index 09d56fb669..7e1300021e 100644
--- a/crypto/asn1/a_object.c
+++ b/crypto/asn1/a_object.c
@@ -222,8 +222,8 @@ ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
}
if ((ret->data == NULL) || (ret->length < len))
{
- if (ret->data != NULL) Free(ret->data);
- ret->data=(unsigned char *)Malloc(len ? (int)len : 1);
+ if (ret->data != NULL) OPENSSL_free(ret->data);
+ ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1);
ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA;
if (ret->data == NULL)
{ i=ERR_R_MALLOC_FAILURE; goto err; }
@@ -249,7 +249,7 @@ ASN1_OBJECT *ASN1_OBJECT_new(void)
{
ASN1_OBJECT *ret;
- ret=(ASN1_OBJECT *)Malloc(sizeof(ASN1_OBJECT));
+ ret=(ASN1_OBJECT *)OPENSSL_malloc(sizeof(ASN1_OBJECT));
if (ret == NULL)
{
ASN1err(ASN1_F_ASN1_OBJECT_NEW,ERR_R_MALLOC_FAILURE);
@@ -270,19 +270,19 @@ void ASN1_OBJECT_free(ASN1_OBJECT *a)
if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS)
{
#ifndef CONST_STRICT /* disable purely for compile-time strict const checking. Doing this on a "real" compile will cause memory leaks */
- if (a->sn != NULL) Free((void *)a->sn);
- if (a->ln != NULL) Free((void *)a->ln);
+ if (a->sn != NULL) OPENSSL_free((void *)a->sn);
+ if (a->ln != NULL) OPENSSL_free((void *)a->ln);
#endif
a->sn=a->ln=NULL;
}
if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA)
{
- if (a->data != NULL) Free(a->data);
+ if (a->data != NULL) OPENSSL_free(a->data);
a->data=NULL;
a->length=0;
}
if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC)
- Free(a);
+ OPENSSL_free(a);
}
ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,