Fix the return type of felem_is_zero_int which should be int.
[oweals/openssl.git] / apps / rand.c
index e159da37be18e77a34b43b32982f1045d9c0b73e..96dcb7273a4dfeaf7c1478177556628639f0ac0e 100644 (file)
@@ -86,9 +86,8 @@ int MAIN(int argc, char **argv)
     int hex = 0;
     BIO *out = NULL;
     int num = -1;
-#ifndef OPENSSL_NO_ENGINE
+    ENGINE *e = NULL;
     char *engine = NULL;
-#endif
 
     apps_startup();
 
@@ -162,9 +161,7 @@ int MAIN(int argc, char **argv)
         BIO_printf(bio_err, "-hex                  - hex encode output\n");
         goto err;
     }
-#ifndef OPENSSL_NO_ENGINE
-    setup_engine(bio_err, engine, 0);
-#endif
+    e = setup_engine(bio_err, engine, 0);
 
     app_RAND_load_file(NULL, bio_err, (inrand != NULL));
     if (inrand != NULL)
@@ -222,6 +219,7 @@ int MAIN(int argc, char **argv)
 
  err:
     ERR_print_errors(bio_err);
+    release_engine(e);
     if (out)
         BIO_free_all(out);
     apps_shutdown();