mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
sm2: fix coverity 1467503: explicit null dereference
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14618)
This commit is contained in:
parent
993237a8b6
commit
fbe286a36e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user