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:
parent
214a3aa34e
commit
37a483a884
2 changed files with 6 additions and 0 deletions
|
|
@ -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
2
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue