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

ruby-changes:6386

From: matz <ko1@a...>
Date: Sun, 6 Jul 2008 05:55:03 +0900 (JST)
Subject: [ruby-changes:6386] Ruby:r17902 (ruby_1_8_6): * re.c (rb_reg_search): need to free allocated buffer in re_register.

matz	2008-07-06 05:54:52 +0900 (Sun, 06 Jul 2008)

  New Revision: 17902

  Modified files:
    branches/ruby_1_8_6/ChangeLog
    branches/ruby_1_8_6/re.c

  Log:
    * re.c (rb_reg_search): need to free allocated buffer in re_register. [ruby-core:17518]

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

Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog	(revision 17901)
+++ ruby_1_8_6/ChangeLog	(revision 17902)
@@ -911,6 +911,10 @@
 
 	* file.c (rb_file_s_extname): ditto.
 
+Sat May 17 10:18:44 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* re.c (rb_reg_search): need to free allocated buffer in re_register.
+
 Mon Mar  3 23:34:13 2008  GOTOU Yuuzou  <gotoyuzo@n...>
 
 	* lib/webrick/httpservlet/filehandler.rb: should normalize path
Index: ruby_1_8_6/re.c
===================================================================
--- ruby_1_8_6/re.c	(revision 17901)
+++ ruby_1_8_6/re.c	(revision 17902)
@@ -927,6 +927,7 @@
     }
 
     if (result < 0) {
+	re_free_registers(&regs);
 	rb_backref_set(Qnil);
 	return result;
     }
@@ -943,6 +944,7 @@
     }
 
     re_copy_registers(RMATCH(match)->regs, &regs);
+    re_free_registers(&regs);
     RMATCH(match)->str = rb_str_new4(str);
     rb_backref_set(match);
 

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

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