BUG/MINOR: conf: calloc untested

A calloc is executed without check of its returns code.
This commit is contained in:
Thierry FOURNIER / OZON.IO 2016-11-24 23:58:32 +01:00 committed by Willy Tarreau
parent 8a1027aa45
commit 5948b01149

View File

@ -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);