summaryrefslogtreecommitdiffstats
path: root/apps/enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/enc.c b/apps/enc.c
index 33edd6c2d1..f31e2c8ba7 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -82,6 +82,7 @@ int enc_main(int argc, char **argv)
{
static char buf[128];
static const char magic[] = "Salted__";
+ ENGINE *e = NULL;
BIO *in = NULL, *out = NULL, *b64 = NULL, *benc = NULL, *rbio =
NULL, *wbio = NULL;
EVP_CIPHER_CTX *ctx = NULL;
@@ -151,7 +152,7 @@ int enc_main(int argc, char **argv)
passarg = opt_arg();
break;
case OPT_ENGINE:
- (void)setup_engine(opt_arg(), 0);
+ e = setup_engine(opt_arg(), 0);
break;
case OPT_D:
enc = 0;
@@ -552,6 +553,7 @@ int enc_main(int argc, char **argv)
#ifdef ZLIB
BIO_free(bzl);
#endif
+ release_engine(e);
OPENSSL_free(pass);
return (ret);
}