BUG/MINOR: proxy: preset the error message pointer to NULL in parse_new_proxy()
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Feb 2022 15:37:19 +0000 (16:37 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 25 Feb 2022 12:20:53 +0000 (13:20 +0100)
commit1c54f4687418788a28e548f38e5976dae68a14bd
treef2315e524e97a4bdda79c7ab9f6d26caf8e54db9
parent528401e3a5c0c206492a18e2feb546b589c0ba8c
BUG/MINOR: proxy: preset the error message pointer to NULL in parse_new_proxy()

As reported by Coverity in issue #1568, a missing initialization of the
error message pointer in parse_new_proxy() may result in displaying garbage
or crashing in case of memory allocation error when trying to create a new
proxy on startup.

This should be backported to 2.4.

(cherry picked from commit 282b6a7539add7517f2b16cc82b6a3509492fd76)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/proxy.c