mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
openssl: fix free function of OpenSSL::Cipher
* ext/openssl/ossl_cipher.c (ossl_cipher_free): Use EVP_CIPHER_CTX_free() to free EVP_CIPHER_CTX allocated by EVP_CIPHER_CTX_new(). [ruby-core:75225] [Feature #12324] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2f49aa8f62
commit
c487224f48
2 changed files with 7 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Jun 6 17:10:50 2016 Kazuki Yamaguchi <k@rhe.jp>
|
||||
|
||||
* ext/openssl/ossl_cipher.c (ossl_cipher_free): Use EVP_CIPHER_CTX_free()
|
||||
to free EVP_CIPHER_CTX allocated by EVP_CIPHER_CTX_new().
|
||||
[ruby-core:75225] [Feature #12324]
|
||||
|
||||
Mon Jun 6 13:37:08 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* string.c Change rb_str_casemap to use encoding primitive
|
||||
|
|
|
@ -81,11 +81,7 @@ ossl_cipher_new(const EVP_CIPHER *cipher)
|
|||
static void
|
||||
ossl_cipher_free(void *ptr)
|
||||
{
|
||||
EVP_CIPHER_CTX *ctx = ptr;
|
||||
if (ctx) {
|
||||
EVP_CIPHER_CTX_cleanup(ctx);
|
||||
ruby_xfree(ctx);
|
||||
}
|
||||
EVP_CIPHER_CTX_free(ptr);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Reference in a new issue