BUG/MEDIUM: fix segfault when no argument to -x option
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 19 Jun 2017 13:57:55 +0000 (15:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:43:28 +0000 (14:43 +0200)
commit45eff44e28a36be113a933ee27f16ff5e92775bb
treef306b86be08c29c65447dc8890d7f7ae9687b035
parent4a5be934f121dd227dd22afb96dbf74b87d7dc65
BUG/MEDIUM: fix segfault when no argument to -x option

This patch fixes a segfault in the command line parser.

When haproxy is launched with -x with no argument and -x is the latest
option in argv it segfaults.

Use usage() insteads of exit() on error.
src/haproxy.c