apps: properly initialise arguments to EVP_PKEY_get_bn_param()
[openssl.git] / apps / req.c
index 9fbe4e250f4416d5d9096b5e5d67322599b5bd92..d0c620438bc912804bb8ad0ba5688a61d2e27e32 100644 (file)
@@ -994,7 +994,7 @@ int req_main(int argc, char **argv)
         }
         fprintf(stdout, "Modulus=");
         if (EVP_PKEY_is_a(tpubkey, "RSA")) {
-            BIGNUM *n;
+            BIGNUM *n = NULL;
 
             /* Every RSA key has an 'n' */
             EVP_PKEY_get_bn_param(pkey, "n", &n);