Raise an error on syscall failure in tls_retry_write_records
[openssl.git] / crypto / x509 / x509_meth.c
index 0159ee056ae36836583cddfb73842227baee795e..305fe4c6d390c9bdb0bb526678e6c898410718b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -23,10 +23,8 @@ X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name)
 
     if (method != NULL) {
         method->name = OPENSSL_strdup(name);
-        if (method->name == NULL) {
-            ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE);
+        if (method->name == NULL)
             goto err;
-        }
     }
 
     return method;