From: Willy Tarreau Date: Fri, 1 May 2015 17:59:56 +0000 (+0200) Subject: BUG/MINOR: config: clear proxy->table.peers.p for disabled proxies X-Git-Tag: v1.6-dev2~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02df7740fbb5bf55113d9082a237158e26751eea;p=thirdparty%2Fhaproxy.git BUG/MINOR: config: clear proxy->table.peers.p for disabled proxies If a table in a disabled proxy references a peers section, the peers name is not resolved to a pointer to a table, but since it belongs to a union, it can later be dereferenced. Right now it seems it cannot happen, but it definitely will after the pending changes. It doesn't cost anything to backport this into 1.5, it will make gdb sessions less head-scratching. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 8ab7da92d6..ce0517c6a1 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -6492,6 +6492,8 @@ int check_config_validity() if (curproxy->state == PR_STSTOPPED) { /* ensure we don't keep listeners uselessly bound */ stop_proxy(curproxy); + free((void *)curproxy->table.peers.name); + curproxy->table.peers.p = NULL; continue; }