Fix from 1.0.0-stable.
[oweals/openssl.git] / crypto / dso / dso_err.c
index aa91170b1be96ec2962175544422b4afd4743d40..a8b0a210de4384336c83743cf99ef2923c6cc3d9 100644 (file)
@@ -136,15 +136,12 @@ static ERR_STRING_DATA DSO_str_reasons[]=
 
 void ERR_load_DSO_strings(void)
        {
-       static int init=1;
+#ifndef OPENSSL_NO_ERR
 
-       if (init)
+       if (ERR_func_error_string(DSO_str_functs[0].error) == NULL)
                {
-               init=0;
-#ifndef OPENSSL_NO_ERR
                ERR_load_strings(0,DSO_str_functs);
                ERR_load_strings(0,DSO_str_reasons);
-#endif
-
                }
+#endif
        }