From: Pauli Date: Fri, 3 Jan 2020 09:28:37 +0000 (+1000) Subject: coverity 1456638: fix null check X-Git-Tag: openssl-3.0.0-alpha1~752 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=75e571b59298c868763508d60027e4e666dee1c1;p=oweals%2Fopenssl.git coverity 1456638: 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_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; }