mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
MINOR: checks: deinit checks_fe upon deinit
This is just to make valgrind and friends happy, leverage deinit_proxy() for checks_fe proxy upon deinit to ensure proper cleanup. We check the presence of proxy->id to know if it was initialized because we cannot rely on a pointer for that.
This commit is contained in:
parent
fbfeb591f7
commit
8a944d0e46
1 changed files with 7 additions and 0 deletions
|
|
@ -1746,6 +1746,12 @@ static int start_checks()
|
|||
return ERR_NONE;
|
||||
}
|
||||
|
||||
/* called during deinit */
|
||||
static void clear_checks()
|
||||
{
|
||||
if (checks_fe.id)
|
||||
deinit_proxy(&checks_fe);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return value:
|
||||
|
|
@ -1998,6 +2004,7 @@ REGISTER_POST_CHECK(start_checks);
|
|||
|
||||
REGISTER_SERVER_DEINIT(deinit_srv_check);
|
||||
REGISTER_SERVER_DEINIT(deinit_srv_agent_check);
|
||||
REGISTER_POST_DEINIT(clear_checks);
|
||||
|
||||
/* perform minimal initializations */
|
||||
static void init_checks()
|
||||
|
|
|
|||
Loading…
Reference in a new issue