fix mem leak with local BASH_REMATCH

This commit is contained in:
Chet Ramey
2022-06-03 11:33:35 -04:00
parent eed646cc60
commit ebeba87477
16 changed files with 3081 additions and 2932 deletions
+5
View File
@@ -1335,6 +1335,11 @@ expression are saved in the remaining @code{BASH_REMATCH} indices.
The element of @code{BASH_REMATCH} with index @var{n} is the portion of the
string matching the @var{n}th parenthesized subexpression.
Bash sets
@code{BASH_REMATCH}
in the global scope; declaring it as a local variable will lead to
unexpected results.
Expressions may be combined using the following operators, listed
in decreasing order of precedence: