diff options
Diffstat (limited to 'src/lib/libcrypto/ocsp/ocsp_ext.c')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ext.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_ext.c b/src/lib/libcrypto/ocsp/ocsp_ext.c index ec884cb08f..9c7832b301 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ext.c +++ b/src/lib/libcrypto/ocsp/ocsp_ext.c | |||
@@ -274,7 +274,7 @@ ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, | |||
274 | if (data) | 274 | if (data) |
275 | { | 275 | { |
276 | if ((i=i2d(data,NULL)) <= 0) goto err; | 276 | if ((i=i2d(data,NULL)) <= 0) goto err; |
277 | if (!(b=p=OPENSSL_malloc((unsigned int)i))) | 277 | if (!(b=p=malloc((unsigned int)i))) |
278 | goto err; | 278 | goto err; |
279 | if (i2d(data, &p) <= 0) goto err; | 279 | if (i2d(data, &p) <= 0) goto err; |
280 | } | 280 | } |
@@ -285,7 +285,7 @@ ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, | |||
285 | V_ASN1_SEQUENCE, | 285 | V_ASN1_SEQUENCE, |
286 | V_ASN1_UNIVERSAL, | 286 | V_ASN1_UNIVERSAL, |
287 | IS_SEQUENCE))<=0) goto err; | 287 | IS_SEQUENCE))<=0) goto err; |
288 | if (!(b=p=OPENSSL_malloc((unsigned int)i))) | 288 | if (!(b=p=malloc((unsigned int)i))) |
289 | goto err; | 289 | goto err; |
290 | if (i2d_ASN1_SET_OF_ASN1_OBJECT(sk,&p,(I2D_OF(ASN1_OBJECT))i2d, | 290 | if (i2d_ASN1_SET_OF_ASN1_OBJECT(sk,&p,(I2D_OF(ASN1_OBJECT))i2d, |
291 | V_ASN1_SEQUENCE, | 291 | V_ASN1_SEQUENCE, |
@@ -299,10 +299,10 @@ ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d, | |||
299 | } | 299 | } |
300 | if (!s && !(s = ASN1_STRING_new())) goto err; | 300 | if (!s && !(s = ASN1_STRING_new())) goto err; |
301 | if (!(ASN1_STRING_set(s, b, i))) goto err; | 301 | if (!(ASN1_STRING_set(s, b, i))) goto err; |
302 | OPENSSL_free(b); | 302 | free(b); |
303 | return s; | 303 | return s; |
304 | err: | 304 | err: |
305 | if (b) OPENSSL_free(b); | 305 | if (b) free(b); |
306 | return NULL; | 306 | return NULL; |
307 | } | 307 | } |
308 | #endif | 308 | #endif |
@@ -327,7 +327,7 @@ static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val, | |||
327 | * it relies on library internals. | 327 | * it relies on library internals. |
328 | */ | 328 | */ |
329 | os.length = ASN1_object_size(0, len, V_ASN1_OCTET_STRING); | 329 | os.length = ASN1_object_size(0, len, V_ASN1_OCTET_STRING); |
330 | os.data = OPENSSL_malloc(os.length); | 330 | os.data = malloc(os.length); |
331 | if (os.data == NULL) | 331 | if (os.data == NULL) |
332 | goto err; | 332 | goto err; |
333 | tmpval = os.data; | 333 | tmpval = os.data; |
@@ -342,7 +342,7 @@ static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, unsigned char *val, | |||
342 | ret = 1; | 342 | ret = 1; |
343 | err: | 343 | err: |
344 | if (os.data) | 344 | if (os.data) |
345 | OPENSSL_free(os.data); | 345 | free(os.data); |
346 | return ret; | 346 | return ret; |
347 | } | 347 | } |
348 | 348 | ||