coverity 1462541 Dereference after null check

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
This commit is contained in:
Pauli 2020-04-27 08:01:28 +10:00
parent 9b0e74c41a
commit bd5f280091
1 changed files with 3 additions and 1 deletions

View File

@ -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) {