diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-26 18:48:55 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-26 18:48:55 +0000 |
commit | ea5e22d102a357114846874c2ff641f4a18dbdf1 (patch) | |
tree | 437ac29a0df672035418e7faf00a05c833f72926 /ext/openssl/ossl_x509req.c | |
parent | 996b1bfa95347e5171c3f7ab32b6740656ed7a8b (diff) |
backport fix memory leak from upstream.
https://github.com/ruby/openssl/compare/3a2840e80d275895523a526ce56e4f6e7b8f9cc4...1e30cd395b14ef46e04bdd9ab72f10067890b265
patches are provided by rhe (Kazuki Yamaguchi).
* ext/openssl/ossl_config.c: fix memory leak. [ruby-core:76922] [Bug #12680]
* ext/openssl/ossl_ocsp.c: ditto.
* ext/openssl/ossl_pkcs12.c: ditto.
* ext/openssl/ossl_pkcs7.c: ditto.
* ext/openssl/ossl_pkey_ec.c: ditto.
* ext/openssl/ossl_x509.h: ditto.
* ext/openssl/ossl_x509attr.c: ditto.
* ext/openssl/ossl_x509crl.c: ditto.
* ext/openssl/ossl_x509ext.c: ditto.
* ext/openssl/ossl_x509req.c: ditto.
* ext/openssl/ossl_x509revoked.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_x509req.c')
-rw-r--r-- | ext/openssl/ossl_x509req.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_x509req.c b/ext/openssl/ossl_x509req.c index e5ce088a15..0c13c8ca3e 100644 --- a/ext/openssl/ossl_x509req.c +++ b/ext/openssl/ossl_x509req.c @@ -430,7 +430,7 @@ ossl_x509req_set_attributes(VALUE self, VALUE ary) req->req_info->attributes = NULL; for (i=0;i<RARRAY_LEN(ary); i++) { item = RARRAY_AREF(ary, i); - attr = DupX509AttrPtr(item); + attr = GetX509AttrPtr(item); if (!X509_REQ_add1_attr(req, attr)) { ossl_raise(eX509ReqError, NULL); } @@ -444,7 +444,7 @@ ossl_x509req_add_attribute(VALUE self, VALUE attr) X509_REQ *req; GetX509Req(self, req); - if (!X509_REQ_add1_attr(req, DupX509AttrPtr(attr))) { + if (!X509_REQ_add1_attr(req, GetX509AttrPtr(attr))) { ossl_raise(eX509ReqError, NULL); } |