diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2014-06-20 12:41:27 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2014-06-20 14:03:40 +0200 |
commit | aa6ec754f3b4b1df81d186480c534b6486a1e6ee (patch) | |
tree | f46a9bdaa0362bdee62d66054fb634f444227188 /posix/regcomp.c | |
parent | 7892406e3591be24e64c12dbf7aa8ef5352d0dbc (diff) | |
download | glibc-aa6ec754f3b4b1df81d186480c534b6486a1e6ee.tar.gz glibc-aa6ec754f3b4b1df81d186480c534b6486a1e6ee.tar.xz glibc-aa6ec754f3b4b1df81d186480c534b6486a1e6ee.zip |
Fix another memory leak in regexp compiler (BZ #17069)
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r-- | posix/regcomp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c index a5020be192..076eca3e7c 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -2154,7 +2154,11 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) - return NULL; + { + if (tree != NULL) + postorder (tree, free_tree, NULL); + return NULL; + } } else branch = NULL; |