diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-17 00:49:49 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-17 00:49:49 +0000 |
commit | 07b1f01b335ea67f54e64e24e666dfdafb5b43c1 (patch) | |
tree | 32dbe936bf2783229ce3b83607a375efcb4538ee | |
parent | 36e908901baa9c113b4896f280e615828bbbe8c7 (diff) |
* enc/shift_jis.c (property_name_to_ctype): fix memory leak.
* enc/euc_jp.c (property_name_to_ctype): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | enc/euc_jp.c | 2 | ||||
-rw-r--r-- | enc/shift_jis.c | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Wed Nov 17 09:49:10 2010 NARUSE, Yui <[email protected]> + + * enc/shift_jis.c (property_name_to_ctype): fix memory leak. + + * enc/euc_jp.c (property_name_to_ctype): ditto. + Tue Nov 17 08:54:04 2010 James Edward Gray II <[email protected]> * lib/csv.rb: Upgrading output encoding as needed. [ruby-core:33135] diff --git a/enc/euc_jp.c b/enc/euc_jp.c index 3b339f9600..eb7777a8e5 100644 --- a/enc/euc_jp.c +++ b/enc/euc_jp.c @@ -290,7 +290,7 @@ property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) PROPERTY_LIST_INIT_CHECK; - s = e = ALLOC_N(UChar, end-p+1); + s = e = ALLOCA_N(UChar, end-p+1); for (; p < end; p++) { *e++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); } diff --git a/enc/shift_jis.c b/enc/shift_jis.c index cac4cf7751..ee726cf71a 100644 --- a/enc/shift_jis.c +++ b/enc/shift_jis.c @@ -299,7 +299,7 @@ property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end) PROPERTY_LIST_INIT_CHECK; - s = e = ALLOC_N(UChar, end-p+1); + s = e = ALLOCA_N(UChar, end-p+1); for (; p < end; p++) { *e++ = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p); } |