BUG/MINOR: log: fix memory error handling in parse_logsrv()
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 11 May 2023 16:57:23 +0000 (18:57 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 May 2023 07:45:30 +0000 (09:45 +0200)
commit256d581fbdec0f2814835b5e5cf2825f226afc0e
tree275be007946bcb0fa6bebc8a867a8600e210f870
parentd4dba38ab101eee4cbd0c8d8aa21181825ef6472
BUG/MINOR: log: fix memory error handling in parse_logsrv()

A check was missing in parse_logsrv() to make sure that malloc-dependent
variable is checked for non-NULL before using it.

If malloc fails, the function raises an error and stops, like it's already
done at a few other places within the function.

This partially fixes GH #2130.

It should be backported to every stable versions.
src/log.c