BUG/MINOR: Fix memory leaks cfg_parse_peers
authorEric Salama <esalama@haproxy.com>
Fri, 18 Sep 2020 09:55:17 +0000 (11:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Sep 2020 07:37:33 +0000 (09:37 +0200)
commit9dc605355a34deb2d85d09680a64faff8af11e65
treefeb1533945f3e10bd9cfd68ad9b3494b3207beb7
parent60d098fae166867d78d99ec02877424dd6f0082d
BUG/MINOR: Fix memory leaks cfg_parse_peers

When memory allocation fails in cfg_parse_peers or when an error occurs
while parsing a stick-table, the temporary table and its id must be freed.

This fixes github issue #854. It should be backported as far as 2.0.

(cherry picked from commit 1aab911017e0634c109325eff73d5d49325babed)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 7623beb5192955bdc40aaad218df497e3378d716)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/cfgparse.c