diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/f_string.c')
-rw-r--r-- | src/lib/libcrypto/asn1/f_string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/f_string.c b/src/lib/libcrypto/asn1/f_string.c index f7d36adac7..f4bee15335 100644 --- a/src/lib/libcrypto/asn1/f_string.c +++ b/src/lib/libcrypto/asn1/f_string.c | |||
@@ -149,15 +149,15 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) | |||
149 | if (num+i > slen) | 149 | if (num+i > slen) |
150 | { | 150 | { |
151 | if (s == NULL) | 151 | if (s == NULL) |
152 | sp=(unsigned char *)OPENSSL_malloc( | 152 | sp=(unsigned char *)malloc( |
153 | (unsigned int)num+i*2); | 153 | (unsigned int)num+i*2); |
154 | else | 154 | else |
155 | sp=(unsigned char *)OPENSSL_realloc(s, | 155 | sp=(unsigned char *)realloc(s, |
156 | (unsigned int)num+i*2); | 156 | (unsigned int)num+i*2); |
157 | if (sp == NULL) | 157 | if (sp == NULL) |
158 | { | 158 | { |
159 | ASN1err(ASN1_F_A2I_ASN1_STRING,ERR_R_MALLOC_FAILURE); | 159 | ASN1err(ASN1_F_A2I_ASN1_STRING,ERR_R_MALLOC_FAILURE); |
160 | if (s != NULL) OPENSSL_free(s); | 160 | if (s != NULL) free(s); |
161 | goto err; | 161 | goto err; |
162 | } | 162 | } |
163 | s=sp; | 163 | s=sp; |