+2010-10-11 Ulrich Drepper <drepper@gmail.com>
+
+ * posix/regcomp.c (parse_bracket_exp): Add missing re_free calls.
+
+ [BZ #12078]
+ * posix/regcomp.c (parse_sub_exp): Free tree data when it is not used.
+
2010-10-11 Ulrich Drepper <drepper@gmail.com>
[BZ #12093]
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
- *err = REG_EPAREN;
+ {
+ if (tree != NULL)
+ free_tree (NULL, tree);
+ *err = REG_EPAREN;
+ }
if (BE (*err != REG_NOERROR, 0))
return NULL;
}
if (BE (sbcset == NULL, 0))
#endif /* RE_ENABLE_I18N */
{
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ re_free (mbcset);
+#endif
*err = REG_ESPACE;
return NULL;
}