BUG/MINOR: worker: Missing calloc return value check in mworker_env_to_proc_list
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 19 May 2021 08:45:12 +0000 (10:45 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 May 2021 13:31:35 +0000 (15:31 +0200)
commit80dc1454cb19abf3ba8458e7d35cc0d05211bee0
tree38604f8efc7c9b1c91ae3220f7baa45081e2c0a7
parent46bd5dca638832fea6ce529caebf07cb034b9e3b
BUG/MINOR: worker: Missing calloc return value check in mworker_env_to_proc_list

A memory allocation failure happening in mworker_env_to_proc_list when
trying to allocate a mworker_proc 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 1f4fa906c73e61dba74f9e8b762da12df3052f57)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit d90aa347d2a3a81bae8461c009c9b4d69eb069a5)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/mworker.h
src/haproxy.c
src/mworker.c