bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Mike Jonkmans
Subject: Re: [PATCH] Free unfreed string in assign_assoc_from_kvlist()
Date: Mon, 19 Apr 2021 21:22:54 +0200

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
        aval = expand_assignment_string_to_string (v, 0);
should be moved down below the next if-statement.

Because of the continue, there is a memory leak.

Regards, Mike Jonkmans



reply via email to

[Prev in Thread] Current Thread [Next in Thread]