diff options
author | Ben Laurie <ben@openssl.org> | 2002-01-18 13:19:24 +0100 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2002-01-18 13:19:24 +0100 |
commit | dd2589494f7142aeda2f282a5b6bf1e9a2dd2110 (patch) | |
tree | e5af69972ecd90164f63b8dabaa3ba5dc4840252 /crypto/conf | |
parent | Stupid apps should die, not fail silently. (diff) | |
download | openssl-dd2589494f7142aeda2f282a5b6bf1e9a2dd2110.tar.xz openssl-dd2589494f7142aeda2f282a5b6bf1e9a2dd2110.zip |
Other errors are possible.
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf_mod.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 27c11c1a76..f1950ea16d 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -348,13 +348,20 @@ static int module_init(CONF_MODULE *pmod, char *name, char *value, CONF *cnf) } if (initialized_modules == NULL) + { initialized_modules = sk_CONF_IMODULE_new_null(); - - if (!initialized_modules) - goto err; + if (!initialized_modules) + { + CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE); + goto err; + } + } if (!sk_CONF_IMODULE_push(initialized_modules, imod)) + { + CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE); goto err; + } pmod->links++; @@ -362,8 +369,6 @@ static int module_init(CONF_MODULE *pmod, char *name, char *value, CONF *cnf) err: - CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE); - /* We've started the module so we'd better finish it */ if (pmod->finish && init_called) pmod->finish(imod); |