diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/bio_ndef.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/bio_ndef.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/bio_ndef.c b/src/lib/libcrypto/asn1/bio_ndef.c index b91f97a1b1..60f324bdae 100644 --- a/src/lib/libcrypto/asn1/bio_ndef.c +++ b/src/lib/libcrypto/asn1/bio_ndef.c | |||
| @@ -110,7 +110,7 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) | |||
| 110 | ASN1err(ASN1_F_BIO_NEW_NDEF, ASN1_R_STREAMING_NOT_SUPPORTED); | 110 | ASN1err(ASN1_F_BIO_NEW_NDEF, ASN1_R_STREAMING_NOT_SUPPORTED); |
| 111 | return NULL; | 111 | return NULL; |
| 112 | } | 112 | } |
| 113 | ndef_aux = OPENSSL_malloc(sizeof(NDEF_SUPPORT)); | 113 | ndef_aux = malloc(sizeof(NDEF_SUPPORT)); |
| 114 | asn_bio = BIO_new(BIO_f_asn1()); | 114 | asn_bio = BIO_new(BIO_f_asn1()); |
| 115 | 115 | ||
| 116 | /* ASN1 bio needs to be next to output BIO */ | 116 | /* ASN1 bio needs to be next to output BIO */ |
| @@ -148,7 +148,7 @@ BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it) | |||
| 148 | if (asn_bio) | 148 | if (asn_bio) |
| 149 | BIO_free(asn_bio); | 149 | BIO_free(asn_bio); |
| 150 | if (ndef_aux) | 150 | if (ndef_aux) |
| 151 | OPENSSL_free(ndef_aux); | 151 | free(ndef_aux); |
| 152 | return NULL; | 152 | return NULL; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| @@ -164,7 +164,7 @@ static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) | |||
| 164 | ndef_aux = *(NDEF_SUPPORT **)parg; | 164 | ndef_aux = *(NDEF_SUPPORT **)parg; |
| 165 | 165 | ||
| 166 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); | 166 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); |
| 167 | p = OPENSSL_malloc(derlen); | 167 | p = malloc(derlen); |
| 168 | ndef_aux->derbuf = p; | 168 | ndef_aux->derbuf = p; |
| 169 | *pbuf = p; | 169 | *pbuf = p; |
| 170 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, &p, ndef_aux->it); | 170 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, &p, ndef_aux->it); |
| @@ -187,7 +187,7 @@ static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg) | |||
| 187 | ndef_aux = *(NDEF_SUPPORT **)parg; | 187 | ndef_aux = *(NDEF_SUPPORT **)parg; |
| 188 | 188 | ||
| 189 | if (ndef_aux->derbuf) | 189 | if (ndef_aux->derbuf) |
| 190 | OPENSSL_free(ndef_aux->derbuf); | 190 | free(ndef_aux->derbuf); |
| 191 | 191 | ||
| 192 | ndef_aux->derbuf = NULL; | 192 | ndef_aux->derbuf = NULL; |
| 193 | *pbuf = NULL; | 193 | *pbuf = NULL; |
| @@ -200,7 +200,7 @@ static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg) | |||
| 200 | NDEF_SUPPORT **pndef_aux = (NDEF_SUPPORT **)parg; | 200 | NDEF_SUPPORT **pndef_aux = (NDEF_SUPPORT **)parg; |
| 201 | if (!ndef_prefix_free(b, pbuf, plen, parg)) | 201 | if (!ndef_prefix_free(b, pbuf, plen, parg)) |
| 202 | return 0; | 202 | return 0; |
| 203 | OPENSSL_free(*pndef_aux); | 203 | free(*pndef_aux); |
| 204 | *pndef_aux = NULL; | 204 | *pndef_aux = NULL; |
| 205 | return 1; | 205 | return 1; |
| 206 | } | 206 | } |
| @@ -229,7 +229,7 @@ static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg) | |||
| 229 | return 0; | 229 | return 0; |
| 230 | 230 | ||
| 231 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); | 231 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); |
| 232 | p = OPENSSL_malloc(derlen); | 232 | p = malloc(derlen); |
| 233 | ndef_aux->derbuf = p; | 233 | ndef_aux->derbuf = p; |
| 234 | *pbuf = p; | 234 | *pbuf = p; |
| 235 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, &p, ndef_aux->it); | 235 | derlen = ASN1_item_ndef_i2d(ndef_aux->val, &p, ndef_aux->it); |
