summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/provider_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index 4cadb6a9f0..fb93f9fbe0 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -567,8 +567,11 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
}
/* provider_new() generates an error, so no need here */
- if ((prov = provider_new(name, template.init, template.parameters)) == NULL)
+ prov = provider_new(name, template.init, template.parameters);
+ if (!ossl_provider_set_module_path(prov, template.path)) {
+ ossl_provider_free(prov);
return NULL;
+ }
prov->libctx = libctx;
#ifndef FIPS_MODULE