]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: cli: Prevent double free in CLI ACL lookup
authorNenad Merdanovic <nmerdan@haproxy.com>
Sun, 12 Mar 2017 21:01:35 +0000 (22:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Mar 2017 17:25:53 +0000 (18:25 +0100)
The memory is released by cli_release_mlook, which also properly sets the
pointer to NULL. This was introduced with a big code reorganization
involving moving to the new keyword registration form in commit ad8be61c7.

This fix needs to be backported to 1.7.

Signed-off-by: Nenad Merdanovic <nmerdan@haproxy.com>
src/map.c

index b6fce4df84b333b5e04854dd3cc5648635c69275..90deb08da766378b70f67dfbdc8a6c93c41bfe2c 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -524,7 +524,6 @@ static int cli_io_handler_map_lookup(struct appctx *appctx)
 
        default:
                appctx->st2 = STAT_ST_FIN;
-               free(appctx->ctx.map.chunk.str);
                return 1;
        }
 }