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:
Aurelien DARRAGON 2025-04-10 16:24:57 +02:00
parent fbfeb591f7
commit 8a944d0e46

View File

@ -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()