From bddb7c686e3d1aeb156722adc64b6c35ae720f87 Mon Sep 17 00:00:00 2001 From: beck <> Date: Thu, 17 Apr 2014 13:37:50 +0000 Subject: Change library to use intrinsic memory allocation functions instead of OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free --- src/lib/libcrypto/asn1/asn1_lib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/libcrypto/asn1/asn1_lib.c') diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c index 4d1d6af18d..7b06b6fdc8 100644 --- a/src/lib/libcrypto/asn1/asn1_lib.c +++ b/src/lib/libcrypto/asn1/asn1_lib.c @@ -383,9 +383,9 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) { c=str->data; if (c == NULL) - str->data=OPENSSL_malloc(len+1); + str->data=malloc(len+1); else - str->data=OPENSSL_realloc(c,len+1); + str->data=realloc(c,len+1); if (str->data == NULL) { @@ -407,7 +407,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len) void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) { if (str->data) - OPENSSL_free(str->data); + free(str->data); str->data = data; str->length = len; } @@ -422,7 +422,7 @@ ASN1_STRING *ASN1_STRING_type_new(int type) { ASN1_STRING *ret; - ret=(ASN1_STRING *)OPENSSL_malloc(sizeof(ASN1_STRING)); + ret=(ASN1_STRING *)malloc(sizeof(ASN1_STRING)); if (ret == NULL) { ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE); @@ -439,8 +439,8 @@ void ASN1_STRING_free(ASN1_STRING *a) { if (a == NULL) return; if (a->data && !(a->flags & ASN1_STRING_FLAG_NDEF)) - OPENSSL_free(a->data); - OPENSSL_free(a); + free(a->data); + free(a); } int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) -- cgit v1.2.3-55-g6feb