]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: args: fix double free on error path in argument expression parser
authorWilly Tarreau <w@1wt.eu>
Fri, 6 Dec 2013 14:30:05 +0000 (15:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 Dec 2013 14:30:05 +0000 (15:30 +0100)
commit681e49db491a05fe48704c68f79d188f1d5199fb
tree98beaf76a8e2e0151862ef9b0050cbc2b4fc7581
parentabca5b6ab533223e653d0207f959b3bfe5d8d551
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).
src/arg.c