1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2008-07-05 20:54:52 +00:00
parent 214a3aa34e
commit 37a483a884
2 changed files with 6 additions and 0 deletions

View file

@ -911,6 +911,10 @@ Sat May 17 12:15:48 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_extname): ditto.
Sat May 17 10:18:44 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* re.c (rb_reg_search): need to free allocated buffer in re_register.
Mon Mar 3 23:34:13 2008 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/webrick/httpservlet/filehandler.rb: should normalize path

2
re.c
View file

@ -927,6 +927,7 @@ rb_reg_search(re, str, pos, reverse)
}
if (result < 0) {
re_free_registers(&regs);
rb_backref_set(Qnil);
return result;
}
@ -943,6 +944,7 @@ rb_reg_search(re, str, pos, reverse)
}
re_copy_registers(RMATCH(match)->regs, &regs);
re_free_registers(&regs);
RMATCH(match)->str = rb_str_new4(str);
rb_backref_set(match);