about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/regcomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 0613de6553..9406383283 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1807,6 +1807,8 @@ parse_reg_exp (regexp, preg, token, syntax, nest, err)
               return NULL;
             }
         }
+      else
+	branch = NULL;
       tree = create_tree (tree, branch, 0, new_idx);
       if (BE (new_idx == -1 || tree == NULL, 0))
         return *err = REG_ESPACE, NULL;