Re: [PATCH] Free unfreed string in assign_assoc_from_kvlist()

2021-04-19 Thread Chet Ramey
On 4/19/21 3:22 PM, Mike Jonkmans wrote: On Mon, Apr 19, 2021 at 11:27:13PM +0800, konsolebox wrote: I looked at this code plenty of times and I really think the returned value to expand_assignment_string_to_string (v, 0) needs to be freed too when aval != 0. ... The patch seems to be correct

Re: [PATCH] Free unfreed string in assign_assoc_from_kvlist()

2021-04-19 Thread Chet Ramey
On 4/19/21 11:27 AM, konsolebox wrote: I looked at this code plenty of times and I really think the returned value to expand_assignment_string_to_string (v, 0) needs to be freed too when aval != 0. Thanks for the report. I think you're right. Chet -- ``The lyf so short, the craft so long to l

Re: [PATCH] Free unfreed string in assign_assoc_from_kvlist()

2021-04-19 Thread Mike Jonkmans
On Mon, Apr 19, 2021 at 11:27:13PM +0800, konsolebox wrote: > I looked at this code plenty of times and I really think the returned > value to expand_assignment_string_to_string (v, 0) needs to be freed > too when aval != 0. > > ... The patch seems to be correct. Moreover, I think that the line

[PATCH] Free unfreed string in assign_assoc_from_kvlist()

2021-04-19 Thread konsolebox
I looked at this code plenty of times and I really think the returned value to expand_assignment_string_to_string (v, 0) needs to be freed too when aval != 0. diff --git a/arrayfunc.c b/arrayfunc.c index 8231ba1e..48c43294 100644 --- a/arrayfunc.c +++ b/arrayfunc.c @@ -568,8 +568,6 @@ assign_assoc