Skip to content

Commit

Permalink
in_fluentbit_metrics: add missing release function on init
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and edsiper committed Nov 6, 2023
1 parent a07f45b commit c3465e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/in_fluentbit_metrics/metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static int in_metrics_init(struct flb_input_instance *in,
flb_plg_error(ctx->ins,
"could not set collector on start for Fluent Bit "
"metrics plugin");
flb_free(ctx);
return -1;
}
ctx->coll_fd_start = ret;
Expand All @@ -131,6 +132,7 @@ static int in_metrics_init(struct flb_input_instance *in,
if (ret == -1) {
flb_plg_error(ctx->ins,
"could not set collector for Fluent Bit metrics plugin");
flb_free(ctx);
return -1;
}
ctx->coll_fd_runtime = ret;
Expand Down

0 comments on commit c3465e6

Please sign in to comment.