mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-25 12:28:01 +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));
|
rule = calloc(1, sizeof(*rule));
|
||||||
|
if (!rule) {
|
||||||
|
Alert("Out of memory error.\n");
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
rule->cond = cond;
|
rule->cond = cond;
|
||||||
rule->be.name = strdup(args[1]);
|
rule->be.name = strdup(args[1]);
|
||||||
LIST_INIT(&rule->list);
|
LIST_INIT(&rule->list);
|
||||||
|
Loading…
Reference in New Issue
Block a user