Revision: 3636 http://trac.macosforge.org/projects/ruby/changeset/3636 Author: lsansonetti@apple.com Date: 2010-02-26 16:16:02 -0800 (Fri, 26 Feb 2010) Log Message: ----------- use orig_free and not free since it's a macro to xfree Modified Paths: -------------- MacRuby/branches/icu/parse.y Modified: MacRuby/branches/icu/parse.y =================================================================== --- MacRuby/branches/icu/parse.y 2010-02-26 23:44:04 UTC (rev 3635) +++ MacRuby/branches/icu/parse.y 2010-02-27 00:16:02 UTC (rev 3636) @@ -34,6 +34,7 @@ #define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size) #define YYFREE(ptr) rb_parser_free(parser, ptr) static inline void *orig_malloc(size_t l) { return malloc(l); } +static inline void orig_free(void *ptr) { free(ptr); } #define malloc YYMALLOC #define realloc YYREALLOC #define calloc YYCALLOC @@ -5100,7 +5101,8 @@ NODE *node = yycompile(parser, f, line); if (need_free && chars != NULL) { - free(chars); + orig_free(chars); + chars = NULL; } return node;
participants (1)
-
source_changes@macosforge.org