From 75e571b59298c868763508d60027e4e666dee1c1 Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 3 Jan 2020 19:28:37 +1000 Subject: [PATCH] coverity 1456638: fix null check Reviewed-by: Tim Hudson Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10748) --- .../implementations/serializers/serializer_dsa_priv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/providers/implementations/serializers/serializer_dsa_priv.c b/providers/implementations/serializers/serializer_dsa_priv.c index 603904369a..fc0a340ca2 100644 --- a/providers/implementations/serializers/serializer_dsa_priv.c +++ b/providers/implementations/serializers/serializer_dsa_priv.c @@ -48,11 +48,10 @@ static void *dsa_priv_newctx(void *provctx) if (ctx != NULL) { ctx->provctx = provctx; - } - - /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */ - ctx->sc.pbe_nid = -1; + /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */ + ctx->sc.pbe_nid = -1; + } return ctx; } -- 2.39.2