summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-03 19:19:47 +1000
committerPauli <paul.dale@oracle.com>2020-01-05 18:05:14 +1000
commitff19035e62a4839d632d0ac2c3b17983c9598cf9 (patch)
treea6269e6195ec04ae34ff66f674bbf7da4c7a482d /providers
parent1fdde9170cbe36c9cd7bf9dc712836f591f7d511 (diff)
coverity 1456642: fix null check
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10748)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/serializers/serializer_rsa_priv.c6
1 files 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;
}