diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2020-03-17 21:27:57 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2020-03-17 21:27:57 +0000 |
| commit | aa144ced5d61b5c7fb74acaebb37d85bd08f0416 (patch) | |
| tree | 2de6902cff4b007f4fae30a7d6c546b4dd3d1740 /apps/req.c | |
| parent | fbc3ad1ae1976eb5f2bac351260f2c5ee255c27f (diff) | |
Notes
Diffstat (limited to 'apps/req.c')
| -rw-r--r-- | apps/req.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/req.c b/apps/req.c index f9d6fba1094d..a603907cd5af 100644 --- a/apps/req.c +++ b/apps/req.c @@ -200,9 +200,12 @@ static int duplicated(LHASH_OF(OPENSSL_STRING) *addexts, char *kv) *p = '\0'; /* Finally have a clean "key"; see if it's there [by attempt to add it]. */ - if ((p = (char *)lh_OPENSSL_STRING_insert(addexts, (OPENSSL_STRING*)kv)) - != NULL || lh_OPENSSL_STRING_error(addexts)) { - OPENSSL_free(p != NULL ? p : kv); + p = (char *)lh_OPENSSL_STRING_insert(addexts, (OPENSSL_STRING*)kv); + if (p != NULL) { + OPENSSL_free(p); + return 1; + } else if (lh_OPENSSL_STRING_error(addexts)) { + OPENSSL_free(kv); return -1; } @@ -435,12 +438,14 @@ int req_main(int argc, char **argv) if (verbose) BIO_printf(bio_err, "Using configuration from %s\n", template); - req_conf = app_load_config(template); + if ((req_conf = app_load_config(template)) == NULL) + goto end; if (addext_bio) { if (verbose) BIO_printf(bio_err, "Using additional configuration from command line\n"); - addext_conf = app_load_config_bio(addext_bio, NULL); + if ((addext_conf = app_load_config_bio(addext_bio, NULL)) == NULL) + goto end; } if (template != default_config_file && !app_load_modules(req_conf)) goto end; |
