summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-06-01 23:06:48 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-06-01 23:06:48 +0000
commitbdfe932dca124c9fedb03711bbe1c961290262c0 (patch)
tree87a239ecd5037f264ffa86c2db683c947aa7f568 /ssl/ssl_lib.c
parent3fc59c84061373c285eb90c4b8fae075a28daaf3 (diff)
Release engine reference when calling SSL_CTX_free().
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index bc6016194c..fac080c19d 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -156,6 +156,9 @@
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h>
#endif
+#ifndef OPENSSL_NO_ENGINE
+#include <openssl/engine.h>
+#endif
const char *SSL_version_str=OPENSSL_VERSION_TEXT;
@@ -1653,6 +1656,10 @@ void SSL_CTX_free(SSL_CTX *a)
if (a->psk_identity_hint)
OPENSSL_free(a->psk_identity_hint);
#endif
+#ifndef OPENSSL_NO_ENGINE
+ if (a->client_cert_engine)
+ ENGINE_finish(a->client_cert_engine);
+#endif
OPENSSL_free(a);
}