diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 11:18:04 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | 96487cddd408e247819c4f122bd86e53ae4bd6c0 (patch) | |
tree | f6b424b2ce4d1d6ae2604b26d9fb956e13f932a2 /apps/s_cb.c | |
parent | 90945fa31a42dcf3beb90540c618e4d627c595ea (diff) |
Continue standardisation of malloc handling in apps
continue on from previous commits but in the apps directory
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r-- | apps/s_cb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index 884b5e1cf3..734d57fda4 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -1279,8 +1279,10 @@ int ssl_load_stores(SSL_CTX *ctx, { X509_STORE *vfy = NULL, *ch = NULL; int rv = 0; - if (vfyCApath || vfyCAfile) { + if (vfyCApath != NULL || vfyCAfile != NULL) { vfy = X509_STORE_new(); + if (vfy == NULL) + goto err; if (!X509_STORE_load_locations(vfy, vfyCAfile, vfyCApath)) goto err; add_crls_store(vfy, crls); @@ -1288,8 +1290,10 @@ int ssl_load_stores(SSL_CTX *ctx, if (crl_download) store_setup_crl_download(vfy); } - if (chCApath || chCAfile) { + if (chCApath != NULL || chCAfile != NULL) { ch = X509_STORE_new(); + if (ch == NULL) + goto err; if (!X509_STORE_load_locations(ch, chCAfile, chCApath)) goto err; SSL_CTX_set1_chain_cert_store(ctx, ch); |