mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MEDIUM: args: fix double free on error path in argument expression parser
William Lallemand reported a double free on the args parser used in fetches
and ACLs. The cause is that the arg expression is not fully initialized nor
deinitialized when killed and that one of the pointers was already freed once
in certain error conditions.
Simply set it to NULL after the first call to free().
The bug was apparently introduced in 1.5-dev9 with commit 2ac5718
(MEDIUM: add a new typed argument list parsing framework).
This commit is contained in:
parent
abca5b6ab5
commit
681e49db49
1 changed files with 1 additions and 0 deletions
|
|
@ -290,6 +290,7 @@ int make_arg_list(const char *in, int len, unsigned int mask, struct arg **argp,
|
|||
err:
|
||||
free(word);
|
||||
free(*argp);
|
||||
*argp = NULL;
|
||||
if (err_arg)
|
||||
*err_arg = pos;
|
||||
if (err_ptr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue