commit | 5948b0114947460cb60f1de63bdce9ce65d6bbc7 | [log] [tgz] |
---|---|---|
author | Thierry FOURNIER / OZON.IO <thierry.fournier@ozon.io> | Thu Nov 24 23:58:32 2016 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Fri Nov 25 07:15:06 2016 +0100 |
tree | 84e8ea69750ddc8d79c22598187ed15bfd29f734 | |
parent | 8a1027aa45a8f79c3a1cb5ddaa3c691ae4caf6ad [diff] |
BUG/MINOR: conf: calloc untested A calloc is executed without check of its returns code.
diff --git a/src/cfgparse.c b/src/cfgparse.c index a355aa9..40fd7da 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c
@@ -4012,6 +4012,10 @@ } 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);