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 <[email protected]>
  • Loading branch information
pwhelan committed Jan 19, 2024
1 parent c1bbded commit fdd0bbe
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 @@ -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);
Expand Down

0 comments on commit fdd0bbe

Please sign in to comment.