diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | regparse.c | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Wed Jul 30 21:08:06 2008 Yusuke Endoh <mame@tsg.ne.jp> + + * regparse.c (parse_exp): fix memory leak at Regexp.new("x{1,1}"). + Wed Jul 30 17:48:15 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * win32/win32.c (rb_w32_select): recalc the rest of timeout for each diff --git a/regparse.c b/regparse.c index 4a5e861fd..0caecc11e 100644 --- a/regparse.c +++ b/regparse.c @@ -5392,6 +5392,9 @@ parse_exp(Node** np, OnigToken* tok, int term, if (r == 0) { *targetp = qn; } + else if (r == 1) { + onig_node_free(qn); + } else if (r == 2) { /* split case: /abc+/ */ Node *tmp; |