From b1b4d5fd2774a4e15e185dea3602e304c972e3ab Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Fri, 19 Jan 2024 11:15:42 -0300 Subject: [PATCH] in_calyptia_fleet: fix memory leak when setting conf_path_file. Signed-off-by: Phillip Whelan --- plugins/in_calyptia_fleet/in_calyptia_fleet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.c b/plugins/in_calyptia_fleet/in_calyptia_fleet.c index 89d396721f7..cbacc38de76 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -486,6 +486,9 @@ static void *do_reload(void *data) /* avoid reloading the current configuration... just use our new one! */ flb_context_set(reload->flb); reload->flb->config->enable_hot_reload = FLB_TRUE; + if (reload->flb->config->conf_path_file) { + flb_sds_destroy(reload->flb->config->conf_path_file); + } reload->flb->config->conf_path_file = reload->cfg_path; flb_free(reload);