If an engine comes up explicitely, it must also come down explicitely
[openssl.git] / apps / s_server.c
index 2051459c3b34e2e17a87d0e2a8e11fcb4905ddda..d32b9dffd5102a6736611878f93416168d57cd5b 100644 (file)
@@ -679,7 +679,7 @@ typedef enum OPTION_choice {
     OPT_X_ENUM
 } OPTION_CHOICE;
 
-OPTIONS s_server_options[] = {
+const OPTIONS s_server_options[] = {
     {"help", OPT_HELP, '-', "Display this summary"},
     {"port", OPT_PORT, 'p',
      "TCP/IP port to listen on for connections (default is " PORT ")"},
@@ -1963,6 +1963,7 @@ int s_server_main(int argc, char *argv[])
     ssl_excert_free(exc);
     sk_OPENSSL_STRING_free(ssl_args);
     SSL_CONF_CTX_free(cctx);
+    release_engine(engine);
     BIO_free(bio_s_out);
     bio_s_out = NULL;
     BIO_free(bio_s_msg);