Willy, Am 11.05.19 um 05:53 schrieb Willy Tarreau: >> 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.
I believe it is not strictly necessary here, because the pointer is overridden directly below - when writing to the scope member of the var struct (otherwise valgrind would not have complained!) - but I agree that this generally is good style. Thanks Tim Düsterhus