diff options
author | Pauli <paul.dale@oracle.com> | 2020-04-27 08:01:28 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-04-30 20:21:16 +1000 |
commit | bd5f280091e7b9b2308b6f99a239653eb317ca7d (patch) | |
tree | 3f5113912919093464134645f0180480e5e4a9d0 /crypto/ct | |
parent | 9b0e74c41aae177f8abf3227d923a076d2117f9a (diff) |
coverity 1462541 Dereference after null check
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
Diffstat (limited to 'crypto/ct')
-rw-r--r-- | crypto/ct/ct_sct_ctx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/ct/ct_sct_ctx.c b/crypto/ct/ct_sct_ctx.c index 99e0c21154..ad7b6e6f93 100644 --- a/crypto/ct/ct_sct_ctx.c +++ b/crypto/ct/ct_sct_ctx.c @@ -24,8 +24,10 @@ SCT_CTX *SCT_CTX_new(OPENSSL_CTX *libctx, const char *propq) { SCT_CTX *sctx = OPENSSL_zalloc(sizeof(*sctx)); - if (sctx == NULL) + if (sctx == NULL) { CTerr(CT_F_SCT_CTX_NEW, ERR_R_MALLOC_FAILURE); + return NULL; + } sctx->libctx = libctx; if (propq != NULL) { |