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

ruby-changes:8275

From: mame <ko1@a...>
Date: Thu, 16 Oct 2008 23:45:23 +0900 (JST)
Subject: [ruby-changes:8275] Ruby:r19803 (trunk): * compile.c (iseq_set_sequence): fix memory leak.

mame	2008-10-16 23:38:08 +0900 (Thu, 16 Oct 2008)

  New Revision: 19803

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

  Log:
    * compile.c (iseq_set_sequence): fix memory leak.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19802)
+++ ChangeLog	(revision 19803)
@@ -1,3 +1,7 @@
+Thu Oct 16 23:37:11 2008  Yusuke Endoh  <mame@t...>
+
+	* compile.c (iseq_set_sequence): fix memory leak.
+
 Thu Oct 16 23:27:27 2008  Tanaka Akira  <akr@f...>
 
 	* lib/test/unit.rb (assert_equal): avoid incompatible character
Index: compile.c
===================================================================
--- compile.c	(revision 19802)
+++ compile.c	(revision 19803)
@@ -1309,6 +1309,8 @@
 		    rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no,
 				     "operand size miss! (%d for %d)",
 				     iobj->operand_size, len - 1);
+		    xfree(generated_iseq);
+		    xfree(insn_info_table);
 		    return 0;
 		}
 
@@ -1403,6 +1405,8 @@
 		      default:
 			rb_compile_error(RSTRING_PTR(iseq->filename), iobj->line_no,
 					 "unknown operand type: %c", type);
+			xfree(generated_iseq);
+			xfree(insn_info_table);
 			return 0;
 		    }
 		}

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

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