summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/a_time.c')
-rw-r--r--crypto/asn1/a_time.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index 92be1109a2..4459a68156 100644
--- a/crypto/asn1/a_time.c
+++ b/crypto/asn1/a_time.c
@@ -420,10 +420,8 @@ int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str)
* new t.data would be freed after ASN1_STRING_copy is done.
*/
t.data = OPENSSL_zalloc(t.length + 1);
- if (t.data == NULL) {
- ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
+ if (t.data == NULL)
goto out;
- }
memcpy(t.data, str + 2, t.length);
t.type = V_ASN1_UTCTIME;
}