From: Yukihiro Matsumoto Date: 2008-05-17T13:53:25+09:00 Subject: Re: patch Hi, In message "Re: patch" on Thu, 1 May 2008 05:24:22 +0900, "Roger Pack" writes: |It said on the web site to throw ones patches this direction. | |Here's one for a bug submitted [and fixed] about 6 months ago. Guess |I forgot to submit the patch itself. |This is a fix for the following leaks: Recently I fixed memory leak problem in 1.8. Do you check if the following patch would change the situation or not? matz. --- a/re.c +++ b/re.c @@ -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);