diff options
Diffstat (limited to 'crypto/asn1/a_enum.c')
-rw-r--r-- | crypto/asn1/a_enum.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/asn1/a_enum.c b/crypto/asn1/a_enum.c index ccf62e5a04..572ba2e1b2 100644 --- a/crypto/asn1/a_enum.c +++ b/crypto/asn1/a_enum.c @@ -168,9 +168,9 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp, goto err; } - /* We must Malloc stuff, even for 0 bytes otherwise it + /* We must OPENSSL_malloc stuff, even for 0 bytes otherwise it * signifies a missing NULL parameter. */ - s=(unsigned char *)Malloc((int)len+1); + s=(unsigned char *)OPENSSL_malloc((int)len+1); if (s == NULL) { i=ERR_R_MALLOC_FAILURE; @@ -219,7 +219,7 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp, p+=len; } - if (ret->data != NULL) Free(ret->data); + if (ret->data != NULL) OPENSSL_free(ret->data); ret->data=s; ret->length=(int)len; if (a != NULL) (*a)=ret; @@ -242,8 +242,8 @@ int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v) if (a->length < (sizeof(long)+1)) { if (a->data != NULL) - Free(a->data); - if ((a->data=(unsigned char *)Malloc(sizeof(long)+1)) != NULL) + OPENSSL_free(a->data); + if ((a->data=(unsigned char *)OPENSSL_malloc(sizeof(long)+1)) != NULL) memset((char *)a->data,0,sizeof(long)+1); } if (a->data == NULL) @@ -318,7 +318,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai) else ret->type=V_ASN1_ENUMERATED; j=BN_num_bits(bn); len=((j == 0)?0:((j/8)+1)); - ret->data=(unsigned char *)Malloc(len+4); + ret->data=(unsigned char *)OPENSSL_malloc(len+4); ret->length=BN_bn2bin(bn,ret->data); return(ret); err: |