mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02: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
@ -1746,6 +1746,12 @@ static int start_checks()
|
|||||||
return ERR_NONE;
|
return ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* called during deinit */
|
||||||
|
static void clear_checks()
|
||||||
|
{
|
||||||
|
if (checks_fe.id)
|
||||||
|
deinit_proxy(&checks_fe);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return value:
|
* Return value:
|
||||||
@ -1998,6 +2004,7 @@ REGISTER_POST_CHECK(start_checks);
|
|||||||
|
|
||||||
REGISTER_SERVER_DEINIT(deinit_srv_check);
|
REGISTER_SERVER_DEINIT(deinit_srv_check);
|
||||||
REGISTER_SERVER_DEINIT(deinit_srv_agent_check);
|
REGISTER_SERVER_DEINIT(deinit_srv_agent_check);
|
||||||
|
REGISTER_POST_DEINIT(clear_checks);
|
||||||
|
|
||||||
/* perform minimal initializations */
|
/* perform minimal initializations */
|
||||||
static void init_checks()
|
static void init_checks()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user