From 4c1e06fc400041a47c36c4d66b8bbda30219052f Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 3 Jan 2020 19:22:50 +1000 Subject: [PATCH] coverity 1456640: fix null check Reviewed-by: Tim Hudson Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10748) --- providers/implementations/serializers/serializer_dh_priv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/providers/implementations/serializers/serializer_dh_priv.c b/providers/implementations/serializers/serializer_dh_priv.c index 80d87ac738..a6427dc867 100644 --- a/providers/implementations/serializers/serializer_dh_priv.c +++ b/providers/implementations/serializers/serializer_dh_priv.c @@ -48,11 +48,10 @@ static void *dh_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.25.1