mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-11 05:48:41 +00: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
@ -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 New Issue
Block a user