diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-05 20:54:52 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-05 20:54:52 +0000 |
commit | 37a483a884b789911fbaf46c640ed9a3346ff2d2 (patch) | |
tree | 1088fe7634631c816680250ed7018680a6ae7295 /re.c | |
parent | 214a3aa34ef90c0222e20762021437e710dd16e4 (diff) |
* re.c (rb_reg_search): need to free allocated buffer in re_register. [ruby-core:17518]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -927,6 +927,7 @@ rb_reg_search(re, str, pos, reverse) } if (result < 0) { + re_free_registers(®s); rb_backref_set(Qnil); return result; } @@ -943,6 +944,7 @@ rb_reg_search(re, str, pos, reverse) } re_copy_registers(RMATCH(match)->regs, ®s); + re_free_registers(®s); RMATCH(match)->str = rb_str_new4(str); rb_backref_set(match); |