ruby-changes:43220
From: rhe <ko1@a...>
Date: Mon, 6 Jun 2016 17:11:30 +0900 (JST)
Subject: [ruby-changes:43220] rhe:r55294 (trunk): openssl: fix free function of OpenSSL::Cipher
rhe 2016-06-06 17:11:24 +0900 (Mon, 06 Jun 2016) New Revision: 55294 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55294 Log: 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] Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_cipher.c Index: ChangeLog =================================================================== --- ChangeLog (revision 55293) +++ ChangeLog (revision 55294) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Jun 6 17:10:50 2016 Kazuki Yamaguchi <k@r...> + + * 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@i...> * string.c Change rb_str_casemap to use encoding primitive Index: ext/openssl/ossl_cipher.c =================================================================== --- ext/openssl/ossl_cipher.c (revision 55293) +++ ext/openssl/ossl_cipher.c (revision 55294) @@ -81,11 +81,7 @@ ossl_cipher_new(const EVP_CIPHER *cipher https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_cipher.c#L81 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/