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
+4 -2
View File
@@ -415,7 +415,9 @@ SSHHEELLLL GGRRAAMMMMAARR
Substrings matched by parenthesized subexpressions within the
regular expression are saved in the remaining BBAASSHH__RREEMMAATTCCHH in-
dices. The element of BBAASSHH__RREEMMAATTCCHH with index _n is the portion
of the string matching the _nth parenthesized subexpression.
of the string matching the _nth parenthesized subexpression.
Bash sets BBAASSHH__RREEMMAATTCCHH 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:
@@ -6645,4 +6647,4 @@ BBUUGGSS
GNU Bash 5.2 2022 May 17 BASH(1)
GNU Bash 5.2 2022 June 3 BASH(1)