1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* regparse.c (parse_exp): fix resource leak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-09-12 11:02:21 +00:00
parent d1724ecbd2
commit eca8de632c
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Fri Sep 12 20:00:22 2008 Yusuke Endoh <mame@tsg.ne.jp>
* regparse.c (parse_exp): fix resource leak.
Fri Sep 12 01:21:22 2008 Yusuke Endoh <mame@tsg.ne.jp> Fri Sep 12 01:21:22 2008 Yusuke Endoh <mame@tsg.ne.jp>
* ext/syck/node.c (syck_replace_str2): fix wrong check to free ptr. * ext/syck/node.c (syck_replace_str2): fix wrong check to free ptr.

View file

@ -5387,7 +5387,10 @@ parse_exp(Node** np, OnigToken* tok, int term,
if (tok->u.repeat.possessive != 0) { if (tok->u.repeat.possessive != 0) {
Node* en; Node* en;
en = node_new_enclose(ENCLOSE_STOP_BACKTRACK); en = node_new_enclose(ENCLOSE_STOP_BACKTRACK);
CHECK_NULL_RETURN_MEMERR(en); if (IS_NULL(en)) {
onig_node_free(qn);
return ONIGERR_MEMORY;
}
NENCLOSE(en)->target = qn; NENCLOSE(en)->target = qn;
qn = en; qn = en;
} }