summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-19 02:04:34 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-19 02:05:08 +0900
commite76b56f58e44cb54497d93526d649950f5bdd1c0 (patch)
tree8ac226e1543a560e46ddd83bda1a993e3eb65a70 /ext/openssl/ossl.c
parentad76c8fb6bc9df26601b0b454f3f0b61c2c772c9 (diff)
downloadruby-e76b56f58e44cb54497d93526d649950f5bdd1c0.tar.gz
support Ruby 2.x for openssl
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r--ext/openssl/ossl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 37e619f99d..ce02efd983 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -497,8 +497,11 @@ print_mem_leaks(VALUE self)
int ret;
#endif
- BN_CTX_free(ossl_bn_ctx);
- ossl_bn_ctx = NULL;
+#ifndef HAVE_RB_EXT_RACTOR_SAFE
+ // for Ruby 2.x
+ void ossl_bn_ctx_free(void); // ossl_bn.c
+ ossl_bn_ctx_free();
+#endif
#if OPENSSL_VERSION_NUMBER >= 0x10100000
ret = CRYPTO_mem_leaks_fp(stderr);