From fdd0bbe32195dfc9a2f35c8ce012f40e28723e2f 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 f56f4d6b15c..9aaf9a221bc 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -496,6 +496,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);