]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: check_config_validity: check the returned value of stktable_init()
authorGodbach <nylzhaowei@gmail.com>
Wed, 11 Dec 2013 13:11:41 +0000 (21:11 +0800)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Dec 2013 13:47:05 +0000 (14:47 +0100)
commit9703e66bceb67baf8ebf53430b0d2c85d26e6b86
treef26d6c557f07ef887dc238c6044ad245b6a800c1
parent7056a3521716644c3aac04da961053c0afe470fe
BUG/MINOR: check_config_validity: check the returned value of stktable_init()

The function stktable_init() will return 0 if create_pool() returns NULL. Since
the returned value of this function is ignored, HAProxy will crash if the pool
of stick table is NULL and stksess_new() is called to allocate a new stick
session. It is a better choice to check the returned value and make HAProxy exit
with alert message if any error is caught.

Signed-off-by: Godbach <nylzhaowei@gmail.com>
src/cfgparse.c