summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_dup.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/a_dup.c')
-rw-r--r--crypto/asn1/a_dup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/asn1/a_dup.c b/crypto/asn1/a_dup.c
index 93e8b2aa8d..23d1d63808 100644
--- a/crypto/asn1/a_dup.c
+++ b/crypto/asn1/a_dup.c
@@ -28,10 +28,8 @@ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x)
return NULL;
b = OPENSSL_malloc(i + 10);
- if (b == NULL) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
+ if (b == NULL)
return NULL;
- }
p = b;
i = i2d(x, &p);
p2 = b;
@@ -78,7 +76,7 @@ void *ASN1_item_dup(const ASN1_ITEM *it, const void *x)
i = ASN1_item_i2d(x, &b, it);
if (b == NULL) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
return NULL;
}
p = b;