summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/asn1_lib.c
diff options
context:
space:
mode:
authorbeck <>2014-04-17 13:37:50 +0000
committerbeck <>2014-04-17 13:37:50 +0000
commitbddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch)
tree7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/asn1/asn1_lib.c
parentecec66222d758996a4ff2671ca5026d9ede5ef76 (diff)
downloadopenbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.gz
openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.bz2
openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.zip
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
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1_lib.c')
-rw-r--r--src/lib/libcrypto/asn1/asn1_lib.c12
1 files changed, 6 insertions, 6 deletions
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)
383 { 383 {
384 c=str->data; 384 c=str->data;
385 if (c == NULL) 385 if (c == NULL)
386 str->data=OPENSSL_malloc(len+1); 386 str->data=malloc(len+1);
387 else 387 else
388 str->data=OPENSSL_realloc(c,len+1); 388 str->data=realloc(c,len+1);
389 389
390 if (str->data == NULL) 390 if (str->data == NULL)
391 { 391 {
@@ -407,7 +407,7 @@ int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)
407void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) 407void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len)
408 { 408 {
409 if (str->data) 409 if (str->data)
410 OPENSSL_free(str->data); 410 free(str->data);
411 str->data = data; 411 str->data = data;
412 str->length = len; 412 str->length = len;
413 } 413 }
@@ -422,7 +422,7 @@ ASN1_STRING *ASN1_STRING_type_new(int type)
422 { 422 {
423 ASN1_STRING *ret; 423 ASN1_STRING *ret;
424 424
425 ret=(ASN1_STRING *)OPENSSL_malloc(sizeof(ASN1_STRING)); 425 ret=(ASN1_STRING *)malloc(sizeof(ASN1_STRING));
426 if (ret == NULL) 426 if (ret == NULL)
427 { 427 {
428 ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE); 428 ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);
@@ -439,8 +439,8 @@ void ASN1_STRING_free(ASN1_STRING *a)
439 { 439 {
440 if (a == NULL) return; 440 if (a == NULL) return;
441 if (a->data && !(a->flags & ASN1_STRING_FLAG_NDEF)) 441 if (a->data && !(a->flags & ASN1_STRING_FLAG_NDEF))
442 OPENSSL_free(a->data); 442 free(a->data);
443 OPENSSL_free(a); 443 free(a);
444 } 444 }
445 445
446int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) 446int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b)