diff --git a/ChangeLog b/ChangeLog index d155305d9c..841847fc59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 3 14:42:37 2014 Koichi Sasada + + * iseq.c (iseq_free): resolve memory leak. + Mon Nov 3 13:49:18 2014 Koichi Sasada * iseq.c (iseq_memsize): catch up recent changes. diff --git a/iseq.c b/iseq.c index 561d85be5a..0ebf2a83e5 100644 --- a/iseq.c +++ b/iseq.c @@ -88,7 +88,10 @@ iseq_free(void *ptr) RUBY_FREE_UNLESS_NULL(iseq->callinfo_entries); RUBY_FREE_UNLESS_NULL(iseq->catch_table); RUBY_FREE_UNLESS_NULL(iseq->param.opt_table); - RUBY_FREE_UNLESS_NULL(iseq->param.keyword); + if (iseq->param.keyword != NULL) { + RUBY_FREE_UNLESS_NULL(iseq->param.keyword->default_values); + RUBY_FREE_UNLESS_NULL(iseq->param.keyword); + } compile_data_free(iseq->compile_data); RUBY_FREE_UNLESS_NULL(iseq->iseq); }