summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:12:53 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:12:53 +0000
commit893e02d718f5fb01b0d5690d3f6093c7faf8a55f (patch)
tree3d77df2e76ab8e5ef2e45006962401fc53ef2018
parentd2cf4be9113d1e958eede3d760ffb1589df1115f (diff)
merge revision(s) 16534:
* parse.y (top_local_setup): fixed memory leak bug based on a patch from Roger Pack <rogerpack2005 at gmail.com> in [ruby-core:16610]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--parse.y3
-rw-r--r--version.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 796ca62..61a07d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 15 23:12:02 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (top_local_setup): fixed memory leak bug based on a
+ patch from Roger Pack <rogerpack2005 at gmail.com> in
+ [ruby-core:16610].
+
Sun Jun 15 23:08:29 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* sprintf.c (rb_f_sprintf): fixed SEGV on win32 with "% 0e" % 1.0/0.0.
diff --git a/parse.y b/parse.y
index 53dca1b..53c0ba0 100644
--- a/parse.y
+++ b/parse.y
@@ -5742,7 +5742,7 @@ top_local_setup()
rb_mem_clear(vars+i, len-i);
}
else {
- *vars++ = (VALUE)ruby_scope;
+ *vars++ = 0;
rb_mem_clear(vars, len);
}
ruby_scope->local_vars = vars;
@@ -5758,6 +5758,7 @@ top_local_setup()
if (!(ruby_scope->flags & SCOPE_CLONE))
xfree(ruby_scope->local_tbl);
}
+ ruby_scope->local_vars[-1] = 0; /* no reference needed */
ruby_scope->local_tbl = local_tbl();
}
}
diff --git a/version.h b/version.h
index 7c0707e..07850c2 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 211
+#define RUBY_PATCHLEVEL 212
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8