Skip to content

Commit

Permalink
in_calyptia_fleet: fix memory leak when setting conf_path_file.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Whelan <phil@calyptia.com>
  • Loading branch information
pwhelan authored and Nick Hassan committed Jan 22, 2024
1 parent c77c3bc commit 38f1f75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/in_calyptia_fleet/in_calyptia_fleet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 38f1f75

Please sign in to comment.