sm2: fix coverity explicit null dereference
@@ -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;
