PR: 2295
[oweals/openssl.git] / crypto / pem / pem_err.c
index 7837cde1537f8ba6b4e1fdac30c8ee01ee7cc835..3133563d77b768961e3355a270bdd1743229aa65 100644 (file)
@@ -124,15 +124,12 @@ static ERR_STRING_DATA PEM_str_reasons[]=
 
 void ERR_load_PEM_strings(void)
        {
-       static int init=1;
+#ifndef OPENSSL_NO_ERR
 
-       if (init)
+       if (ERR_func_error_string(PEM_str_functs[0].error) == NULL)
                {
-               init=0;
-#ifndef OPENSSL_NO_ERR
                ERR_load_strings(0,PEM_str_functs);
                ERR_load_strings(0,PEM_str_reasons);
-#endif
-
                }
+#endif
        }