diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-29 20:36:38 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-29 20:36:38 +0000 |
commit | 18f287a36de45edcd39541015b445ee0b954e7b1 (patch) | |
tree | d6afc15c97d97b7e5025d51a391d35d19b4162ef /ext | |
parent | 53369d7e4dab675ede11b584ffc003e51ea62672 (diff) |
backport additional fix memory leak from openssl upstream.
https://github.com/ruby/openssl/commit/e76f076f093efb93dabf2cb042c527500f956061
patches are provided by rhe (Kazuki Yamaguchi).
* ext/openssl/ossl_x509ext.c: additional fix memory leak.
[ruby-core:76922] [Bug #12680]
* text/openssl/test_x509ext.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl_x509ext.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c index 926811ca14..f1058a0c1f 100644 --- a/ext/openssl/ossl_x509ext.c +++ b/ext/openssl/ossl_x509ext.c @@ -247,7 +247,9 @@ ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self) #ifdef HAVE_X509V3_EXT_NCONF_NID rconf = rb_iv_get(self, "@config"); conf = NIL_P(rconf) ? NULL : DupConfigPtr(rconf); + X509V3_set_nconf(ctx, conf); ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING_PTR(valstr)); + X509V3_set_ctx_nodb(ctx); NCONF_free(conf); #else if (!empty_lhash) empty_lhash = lh_new(NULL, NULL); |