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

* string.c (dispose_string): use rb_str_free for freeing string in

parse.y. by Sokolov Yura <funny.falcon@gmail.com>
  https://github.com/ruby/ruby/pull/87 fix GH-87

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-01-11 03:00:23 +00:00
parent 2b131e1eb6
commit 2bcff78b42
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,9 @@
Fri Jan 11 11:59:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
* string.c (dispose_string): use rb_str_free for freeing string in
parse.y. by Sokolov Yura <funny.falcon@gmail.com>
https://github.com/ruby/ruby/pull/87 fix GH-87
Fri Jan 11 09:56:22 2013 Shugo Maeda <shugo@ruby-lang.org> Fri Jan 11 09:56:22 2013 Shugo Maeda <shugo@ruby-lang.org>
* insns.def (defineclass): private constants should not be accessed * insns.def (defineclass): private constants should not be accessed

View file

@ -5948,9 +5948,7 @@ parser_regx_options(struct parser_params *parser)
static void static void
dispose_string(VALUE str) dispose_string(VALUE str)
{ {
/* TODO: should use another API? */ rb_str_free(str);
if (RBASIC(str)->flags & RSTRING_NOEMBED)
xfree(RSTRING_PTR(str));
rb_gc_force_recycle(str); rb_gc_force_recycle(str);
} }