diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-19 10:19:18 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-03-26 08:44:04 +1000 |
commit | fbe286a36efffacc846c9134c4f000f2a49355a0 (patch) | |
tree | f4d41ca1b811269f5ab5d8dc5b70a4f96fcca1bb /providers/implementations/signature/sm2sig.c | |
parent | 993237a8b678a888c05bc88d6c872be74696b768 (diff) |
sm2: fix coverity 1467503: explicit null dereference
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14618)
Diffstat (limited to 'providers/implementations/signature/sm2sig.c')
-rw-r--r-- | providers/implementations/signature/sm2sig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/providers/implementations/signature/sm2sig.c b/providers/implementations/signature/sm2sig.c index 6fb0ff919b..9016aefc02 100644 --- a/providers/implementations/signature/sm2sig.c +++ b/providers/implementations/signature/sm2sig.c @@ -105,8 +105,8 @@ static void *sm2sig_newctx(void *provctx, const char *propq) ctx->libctx = PROV_LIBCTX_OF(provctx); if (propq != NULL && (ctx->propq = OPENSSL_strdup(propq)) == NULL) { OPENSSL_free(ctx); - ctx = NULL; ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE); + return NULL; } /* don't allow to change MD, and in fact there is no such need */ ctx->flag_allow_md = 0; |