]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: vars: always pre-initialize smp in vars_parse_cli_get_var()
authorWilly Tarreau <w@1wt.eu>
Thu, 1 Apr 2021 15:01:43 +0000 (17:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Apr 2021 15:04:17 +0000 (17:04 +0200)
commit374edc70ba7d1c81fcaa29457eac5dffd1caf48d
tree5f4b9751b6a802155f6c66395e73432877a12c2c
parent09f88364b7c654980581d547aca696d44896c404
CLEANUP: vars: always pre-initialize smp in vars_parse_cli_get_var()

In issue #1200 Coverity believes we may use an uninitialized field
smp.sess here while it's not possible because the returned variable
necessarily matches SCOPE_PROC hence smp.sess is not used. But it
cannot see this and it could be confusing if the code later evolved
into something more complex. That's not a critical path so let's
first reset the sample.
src/vars.c