summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--iseq.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 937cedfd57..ea18ad9c42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 6 06:54:34 2015 Koichi Sasada <ko1@atdot.net>
+
+ * iseq.c (rb_iseq_free): free iseq::variable_body to avoid memory
+ leak.
+
Tue Oct 6 06:32:52 2015 Koichi Sasada <ko1@atdot.net>
* proc.c: enable optimization of Proc#call.
diff --git a/iseq.c b/iseq.c
index 0fd95f04cc..376058916d 100644
--- a/iseq.c
+++ b/iseq.c
@@ -93,6 +93,7 @@ rb_iseq_free(const rb_iseq_t *iseq)
}
compile_data_free(iseq->compile_data);
ruby_xfree(iseq->variable_body->iseq);
+ ruby_xfree(iseq->variable_body);
ruby_xfree(iseq->body);
}
RUBY_FREE_LEAVE("iseq");