Fix various incorrect error function codes.
[openssl.git] / crypto / conf / conf_mod.c
index d45adea851314d669cb273be2eb40efb2d59ea1e..46af48280f6fd767bcbe56b9037fe241cb73e721 100644 (file)
@@ -231,7 +231,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
                if (!(flags & CONF_MFLAGS_SILENT))
                        {
                        char rcode[DECIMAL_SIZE(ret)+1];
-                       CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR);
+                       CONFerr(CONF_F_CONF_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
                        BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
                        ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
                        }
@@ -254,7 +254,7 @@ static CONF_MODULE *module_load_dso(const CONF *cnf, char *name, char *value,
        path = NCONF_get_string(cnf, value, "path");
        if (!path)
                {
-               ERR_get_error();
+               ERR_clear_error();
                path = name;
                }
        dso = DSO_load(NULL, path, NULL, 0);