]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: server: remove useless tmptrash assigments in srv_update_status()
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 15 May 2023 15:38:44 +0000 (17:38 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 17 May 2023 07:21:01 +0000 (09:21 +0200)
commit22d584a993b1756405556f9ee0fb4dbc8ffcc8c6
tree316e9bc85391c0e3b4d1e019ecc9e5ba13799947
parent43525abcebabaca0d413db58cf700621fe2d9989
CLEANUP: server: remove useless tmptrash assigments in srv_update_status()

Within srv_update_status subfunctions _op() and _adm(), each time tmptrash
is freed, we assign it to NULL to ensure it will not be reused.

However, within those functions it is not very useful given that tmptrash
is never checked against NULL except upon allocation through
alloc_trash_chunk(), which happens everytime a new log message is
generated, sent, and then freed right away, so there are no code paths
that could lead to tmptrash being checked for reuse (tmptrash is
systematically overwritten since all log messages are independant from
each other).

This was raised by coverity, see GH #2162.
src/server.c