BUG/MINOR: peers: Missing calloc return value check in peers_register_table
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 12 May 2021 15:39:04 +0000 (17:39 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:26:52 +0000 (15:26 +0200)
commitcff2df91415d1b61700a77f62c8f7712b7fb7753
tree0c323af6335d367df6f8831afcc2c56c24c2c33e
parentaf82167246e6a5209e9868a72a967a2afae074ab
BUG/MINOR: peers: Missing calloc return value check in peers_register_table

A memory allocation failure happening during peers_register_table would
have resulted in a crash. This function is only called during init.

It was raised in GitHub issue #1233.
It could be backported to all stable branches.

(cherry picked from commit 208ff01b23eda19fe41780310f4d08ca86e28766)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit be5b1bb8cb683290f80856a3728ccaf3ad47b44b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/peers.h
src/peers.c
src/stick_table.c