mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MINOR: conf: calloc untested
A calloc is executed without check of its returns code.
This commit is contained in:
parent
8a1027aa45
commit
5948b01149
1 changed files with 4 additions and 0 deletions
|
|
@ -4012,6 +4012,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
|||
}
|
||||
|
||||
rule = calloc(1, sizeof(*rule));
|
||||
if (!rule) {
|
||||
Alert("Out of memory error.\n");
|
||||
goto out;
|
||||
}
|
||||
rule->cond = cond;
|
||||
rule->be.name = strdup(args[1]);
|
||||
LIST_INIT(&rule->list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue