diff options
| author | beck <> | 2014-04-17 13:37:50 +0000 |
|---|---|---|
| committer | beck <> | 2014-04-17 13:37:50 +0000 |
| commit | bddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch) | |
| tree | 7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/asn1/x_name.c | |
| parent | ecec66222d758996a4ff2671ca5026d9ede5ef76 (diff) | |
| download | openbsd-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/x_name.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_name.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/x_name.c b/src/lib/libcrypto/asn1/x_name.c index d7c2318693..e14d329639 100644 --- a/src/lib/libcrypto/asn1/x_name.c +++ b/src/lib/libcrypto/asn1/x_name.c | |||
| @@ -132,7 +132,7 @@ IMPLEMENT_ASN1_DUP_FUNCTION(X509_NAME) | |||
| 132 | static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) | 132 | static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) |
| 133 | { | 133 | { |
| 134 | X509_NAME *ret = NULL; | 134 | X509_NAME *ret = NULL; |
| 135 | ret = OPENSSL_malloc(sizeof(X509_NAME)); | 135 | ret = malloc(sizeof(X509_NAME)); |
| 136 | if(!ret) goto memerr; | 136 | if(!ret) goto memerr; |
| 137 | if ((ret->entries=sk_X509_NAME_ENTRY_new_null()) == NULL) | 137 | if ((ret->entries=sk_X509_NAME_ENTRY_new_null()) == NULL) |
| 138 | goto memerr; | 138 | goto memerr; |
| @@ -149,7 +149,7 @@ static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) | |||
| 149 | { | 149 | { |
| 150 | if (ret->entries) | 150 | if (ret->entries) |
| 151 | sk_X509_NAME_ENTRY_free(ret->entries); | 151 | sk_X509_NAME_ENTRY_free(ret->entries); |
| 152 | OPENSSL_free(ret); | 152 | free(ret); |
| 153 | } | 153 | } |
| 154 | return 0; | 154 | return 0; |
| 155 | } | 155 | } |
| @@ -164,8 +164,8 @@ static void x509_name_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it) | |||
| 164 | BUF_MEM_free(a->bytes); | 164 | BUF_MEM_free(a->bytes); |
| 165 | sk_X509_NAME_ENTRY_pop_free(a->entries,X509_NAME_ENTRY_free); | 165 | sk_X509_NAME_ENTRY_pop_free(a->entries,X509_NAME_ENTRY_free); |
| 166 | if (a->canon_enc) | 166 | if (a->canon_enc) |
| 167 | OPENSSL_free(a->canon_enc); | 167 | free(a->canon_enc); |
| 168 | OPENSSL_free(a); | 168 | free(a); |
| 169 | *pval = NULL; | 169 | *pval = NULL; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| @@ -325,7 +325,7 @@ static int x509_name_canon(X509_NAME *a) | |||
| 325 | 325 | ||
| 326 | if (a->canon_enc) | 326 | if (a->canon_enc) |
| 327 | { | 327 | { |
| 328 | OPENSSL_free(a->canon_enc); | 328 | free(a->canon_enc); |
| 329 | a->canon_enc = NULL; | 329 | a->canon_enc = NULL; |
| 330 | } | 330 | } |
| 331 | /* Special case: empty X509_NAME => null encoding */ | 331 | /* Special case: empty X509_NAME => null encoding */ |
| @@ -362,7 +362,7 @@ static int x509_name_canon(X509_NAME *a) | |||
| 362 | 362 | ||
| 363 | a->canon_enclen = i2d_name_canon(intname, NULL); | 363 | a->canon_enclen = i2d_name_canon(intname, NULL); |
| 364 | 364 | ||
| 365 | p = OPENSSL_malloc(a->canon_enclen); | 365 | p = malloc(a->canon_enclen); |
| 366 | 366 | ||
| 367 | if (!p) | 367 | if (!p) |
| 368 | goto err; | 368 | goto err; |
