From: Pauli Date: Fri, 3 Jan 2020 09:22:50 +0000 (+1000) Subject: coverity 1456640: fix null check X-Git-Tag: openssl-3.0.0-alpha1~754 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4c1e06fc400041a47c36c4d66b8bbda30219052f;p=oweals%2Fopenssl.git coverity 1456640: fix null check Reviewed-by: Tim Hudson Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10748) --- 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; }