Skip to content

Commit

Permalink
Merge pull request laurikari#114 from dag-erling/des/no-alloca-bug
Browse files Browse the repository at this point in the history
Fix bug when building without alloca
  • Loading branch information
dag-erling authored Sep 10, 2024
2 parents bd8ca49 + 8fcd44f commit 9c3c093
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,15 @@ tre_match(const tre_tnfa_t *tnfa, const void *string, size_t len,
{
const tre_str_source *source = string;
if (source->rewind == NULL || source->compare == NULL)
/* The backtracking matcher requires rewind and compare
capabilities from the input stream. */
{
/* The backtracking matcher requires rewind and compare
capabilities from the input stream. */
#ifndef TRE_USE_ALLOCA
if (tags)
xfree(tags);
if (tags)
xfree(tags);
#endif /* !TRE_USE_ALLOCA */
return REG_BADPAT;
return REG_BADPAT;
}
}
status = tre_tnfa_run_backtrack(tnfa, string, (int)len, type,
tags, eflags, &eo);
Expand Down

0 comments on commit 9c3c093

Please sign in to comment.