From ff19035e62a4839d632d0ac2c3b17983c9598cf9 Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 3 Jan 2020 19:19:47 +1000 Subject: [PATCH] coverity 1456642: fix null check Reviewed-by: Tim Hudson Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10748) --- providers/implementations/serializers/serializer_rsa_priv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/providers/implementations/serializers/serializer_rsa_priv.c b/providers/implementations/serializers/serializer_rsa_priv.c index 05d9316ba1..3d16e43a4b 100644 --- a/providers/implementations/serializers/serializer_rsa_priv.c +++ b/providers/implementations/serializers/serializer_rsa_priv.c @@ -77,11 +77,9 @@ static void *rsa_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