Raise an error on syscall failure in tls_retry_write_records
[openssl.git] / crypto / x509 / x509_meth.c
index 631cc8f03da237d8f4874093f48eaf961b2bd77e..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
@@ -14,8 +14,8 @@
 #include "internal/cryptlib.h"
 #include <openssl/asn1.h>
 #include <openssl/x509.h>
-#include <openssl/ossl_typ.h>
-#include "x509_lcl.h"
+#include <openssl/types.h>
+#include "x509_local.h"
 
 X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name)
 {
@@ -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) {
-            X509err(X509_F_X509_LOOKUP_METH_NEW, ERR_R_MALLOC_FAILURE);
+        if (method->name == NULL)
             goto err;
-        }
     }
 
     return method;