about summary refs log tree commit diff
path: root/posix/regcomp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-10-12 09:00:33 -0400
committerUlrich Drepper <drepper@redhat.com>2010-10-12 09:00:33 -0400
commitb833d51fbbf78b38c6ff68074c22d3fe3ddd0ce3 (patch)
tree860e5ed3a07d6d0f7a540b610ce50b74195cb39e /posix/regcomp.c
parente9b9cbf5e9bdcda6f0b50456658bac748202dd70 (diff)
downloadglibc-b833d51fbbf78b38c6ff68074c22d3fe3ddd0ce3.tar.gz
glibc-b833d51fbbf78b38c6ff68074c22d3fe3ddd0ce3.tar.xz
glibc-b833d51fbbf78b38c6ff68074c22d3fe3ddd0ce3.zip
One more regex memory leak fixed.
Diffstat (limited to 'posix/regcomp.c')
-rw-r--r--posix/regcomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 4ee7b90ace..b238c08225 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -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)