diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_mbstr.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_mbstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_mbstr.c b/src/lib/libcrypto/asn1/a_mbstr.c index dc953c8325..f6d8da8b3c 100644 --- a/src/lib/libcrypto/asn1/a_mbstr.c +++ b/src/lib/libcrypto/asn1/a_mbstr.c | |||
@@ -185,7 +185,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
185 | dest = *out; | 185 | dest = *out; |
186 | if(dest->data) { | 186 | if(dest->data) { |
187 | dest->length = 0; | 187 | dest->length = 0; |
188 | OPENSSL_free(dest->data); | 188 | free(dest->data); |
189 | dest->data = NULL; | 189 | dest->data = NULL; |
190 | } | 190 | } |
191 | dest->type = str_type; | 191 | dest->type = str_type; |
@@ -231,7 +231,7 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, | |||
231 | cpyfunc = cpy_utf8; | 231 | cpyfunc = cpy_utf8; |
232 | break; | 232 | break; |
233 | } | 233 | } |
234 | if(!(p = OPENSSL_malloc(outlen + 1))) { | 234 | if(!(p = malloc(outlen + 1))) { |
235 | if(free_out) ASN1_STRING_free(dest); | 235 | if(free_out) ASN1_STRING_free(dest); |
236 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,ERR_R_MALLOC_FAILURE); | 236 | ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY,ERR_R_MALLOC_FAILURE); |
237 | return -1; | 237 | return -1; |