From 1ff921797e1d566213bc0887f60bf366a5891b06 Mon Sep 17 00:00:00 2001 From: Mark Kemel Date: Thu, 22 Feb 2024 11:36:43 +0200 Subject: [PATCH] metrics: nullify metrics_slot on agent when disabling Signed-off-by: Mark Kemel --- src/agent/agent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/agent/agent.c b/src/agent/agent.c index cd694025a5..484c5142d2 100644 --- a/src/agent/agent.c +++ b/src/agent/agent.c @@ -1563,6 +1563,7 @@ static int agent_method_disable_metrics(sd_bus_message *m, void *userdata, UNUSE } agent->metrics_enabled = false; sd_bus_slot_unrefp(&agent->metrics_slot); + agent->metrics_slot = NULL; bc_log_debug("Metrics disabled"); return sd_bus_reply_method_return(m, ""); }