]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
One more regex memory leak fixed.
authorUlrich Drepper <drepper@redhat.com>
Tue, 12 Oct 2010 13:00:33 +0000 (09:00 -0400)
committerUlrich Drepper <drepper@redhat.com>
Tue, 12 Oct 2010 13:00:33 +0000 (09:00 -0400)
ChangeLog
posix/bug-regex31.input
posix/regcomp.c

index 219236465caf6f2f4b0a4fc0500c281e8872dcda..e2a4a705173a71b3d831bf2b16618bc3b66e1695 100644 (file)
--- a/ChangeLog
+++ b/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.
index eea961ccf5ec7d600bf5841eb1b18473884d937f..3d1f531f4e4db3730c0d861e9f4bec4ae51b6645 100644 (file)
@@ -1,3 +1,4 @@
+[[][
 ([0]
 ([0]a
 ([0]([0])
index 4ee7b90ace2371f80de5c63d9874931dca487164..b238c08225fafe78378e0cdec59928a97851bf47 100644 (file)
@@ -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)