diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1_lib.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/asn1_lib.c | 12 | 
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) | |||
| 407 | void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) | 407 | void 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 | ||
| 446 | int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) | 446 | int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b) | 
