summaryrefslogtreecommitdiffstats
path: root/crypto/conf
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_err.c1
-rw-r--r--crypto/conf/conf_mod.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c
index dd20a1aafa..ebef728456 100644
--- a/crypto/conf/conf_err.c
+++ b/crypto/conf/conf_err.c
@@ -21,6 +21,7 @@ static const ERR_STRING_DATA CONF_str_functs[] = {
{ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD, 0), "def_load"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_DEF_LOAD_BIO, 0), "def_load_bio"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_GET_NEXT_FILE, 0), "get_next_file"},
+ {ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_ADD, 0), "module_add"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_INIT, 0), "module_init"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_LOAD_DSO, 0), "module_load_dso"},
{ERR_PACK(ERR_LIB_CONF, CONF_F_MODULE_RUN, 0), "module_run"},
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c
index 7622d8e1f3..99f0fcc2b5 100644
--- a/crypto/conf/conf_mod.c
+++ b/crypto/conf/conf_mod.c
@@ -232,9 +232,10 @@ static CONF_MODULE *module_add(DSO *dso, const char *name,
supported_modules = sk_CONF_MODULE_new_null();
if (supported_modules == NULL)
return NULL;
- tmod = OPENSSL_zalloc(sizeof(*tmod));
- if (tmod == NULL)
+ if ((tmod = OPENSSL_zalloc(sizeof(*tmod))) == NULL) {
+ CONFerr(CONF_F_MODULE_ADD, ERR_R_MALLOC_FAILURE);
return NULL;
+ }
tmod->dso = dso;
tmod->name = OPENSSL_strdup(name);