[macruby-changes] [5080] MacRuby/trunk/re.c

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 24 06:56:14 PST 2010


Revision: 5080
          http://trac.macosforge.org/projects/ruby/changeset/5080
Author:   watson1978 at gmail.com
Date:     2010-12-24 06:56:10 -0800 (Fri, 24 Dec 2010)
Log Message:
-----------
Fixed a memory leak.

Modified Paths:
--------------
    MacRuby/trunk/re.c

Modified: MacRuby/trunk/re.c
===================================================================
--- MacRuby/trunk/re.c	2010-12-24 11:44:32 UTC (rev 5079)
+++ MacRuby/trunk/re.c	2010-12-24 14:56:10 UTC (rev 5080)
@@ -728,6 +728,9 @@
 
     if (status != U_ZERO_ERROR) {
 	uregex_close(matcher->pattern);
+	if (need_free) {
+	    free(chars);
+	}
 	rb_raise(rb_eRegexpError, "can't set pattern text: %s",
 		u_errorName(status));	
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101224/87d301fc/attachment.html>


More information about the macruby-changes mailing list