Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
One more regex memory leak fixed.
  • Loading branch information
Ulrich Drepper committed Oct 12, 2010
1 parent e9b9cbf commit b833d51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2010-10-12 Ulrich Drepper <drepper@redhat.com>

[BZ #12078]
* posix/regcomp.c (parse_branch): One more memory leak plugged.
* posix/bug-regex31.input: Add test case.

2010-10-11 Ulrich Drepper <drepper@gmail.com>

* posix/bug-regex31.c: Rewrite to run multiple tests from stdin.
Expand Down
1 change: 1 addition & 0 deletions posix/bug-regex31.input
@@ -1,3 +1,4 @@
[[][
([0]
([0]a
([0]([0])
2 changes: 2 additions & 0 deletions posix/regcomp.c
Expand Up @@ -2160,6 +2160,8 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
exp = parse_expression (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && exp == NULL, 0))
{
if (tree != NULL)
postorder (tree, free_tree, NULL);
return NULL;
}
if (tree != NULL && exp != NULL)
Expand Down

0 comments on commit b833d51

Please sign in to comment.