On Fri, May 10, 2019 at 05:50:50PM +0200, Tim Duesterhus wrote:
> vars_check_arg previously leaked the string containing the variable
> name:
(...)

Thanks Tim! I'm going to apply a minor change :

> diff --git a/src/vars.c b/src/vars.c
> index 477a14632..d32310270 100644
> --- a/src/vars.c
> +++ b/src/vars.c
> @@ -510,6 +510,7 @@ int vars_check_arg(struct arg *arg, char **err)
>                            err);
>       if (!name)
>               return 0;
> +     free(arg->data.str.area);

Here I'll add "arg->data.str.area=NULL". It significantly simplifies debugging
sessions to avoid leaving pointers to freed areas in various structs.

Thanks!
Willy

Reply via email to