mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-12 10:20:00 -04:00
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.
This commit is contained in:
parent
2da02ae8b2
commit
282b6a7539
1 changed files with 1 additions and 1 deletions
|
|
@ -1839,7 +1839,7 @@ struct proxy *parse_new_proxy(const char *name, unsigned int cap,
|
|||
const struct proxy *defproxy)
|
||||
{
|
||||
struct proxy *curproxy = NULL;
|
||||
char *errmsg;
|
||||
char *errmsg = NULL;
|
||||
|
||||
if (!(curproxy = alloc_new_proxy(name, cap, &errmsg))) {
|
||||
ha_alert("parsing [%s:%d] : %s\n", file, linenum, errmsg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue