On 6/9/15 3:42 PM, Jean Delvare wrote: > I think I have a minimal test case now: > > #!/bin/bash > > declare -a ARRAY > > ARRAY[0]=foo > FOO=${ARRAY[0]} # <-- leaks > echo $FOO > > And a candidate fix: > > bash 4.3: Fix memory leak in parameter_brace_expand_word
Thanks for the report. This is the right place for the patch. I made this change back in October 2014 as part of an unrelated fix for an array element quoting issue. (Your patch reuses `temp', but array_variable_part returns a SHELL_VAR *.) Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/