[前][次][番号順一覧][スレッド一覧]

ruby-changes:36170

From: ko1 <ko1@a...>
Date: Mon, 3 Nov 2014 14:43:47 +0900 (JST)
Subject: [ruby-changes:36170] ko1:r48251 (trunk): * iseq.c (iseq_free): resolve memory leak.

ko1	2014-11-03 14:43:31 +0900 (Mon, 03 Nov 2014)

  New Revision: 48251

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48251

  Log:
    * iseq.c (iseq_free): resolve memory leak.

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48250)
+++ ChangeLog	(revision 48251)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Nov  3 14:42:37 2014  Koichi Sasada  <ko1@a...>
+
+	* iseq.c (iseq_free): resolve memory leak.
+
 Mon Nov  3 13:49:18 2014  Koichi Sasada  <ko1@a...>
 
 	* iseq.c (iseq_memsize): catch up recent changes.
Index: iseq.c
===================================================================
--- iseq.c	(revision 48250)
+++ iseq.c	(revision 48251)
@@ -88,7 +88,10 @@ iseq_free(void *ptr) https://github.com/ruby/ruby/blob/trunk/iseq.c#L88
 	    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);
 	}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]