Skip to content

Commit

Permalink
fixup! http_server/health: Implement throughput health check
Browse files Browse the repository at this point in the history
Address Leonardo review: add missing `free` calls in case of allocation
failure

Signed-off-by: Thiago Padilha <[email protected]>
  • Loading branch information
tchrono committed Jul 22, 2022
1 parent 4731593 commit 5860b2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/http_server/api/v1/health.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ static void configure_throughput_check(struct flb_config *config)
flb_utils_split(config->hc_throughput_input_plugins, ',', 0);

if (!throughput_check_state.input_plugins) {
flb_free(throughput_check_state.sample_list);
flb_errno();
return;
}
Expand All @@ -541,6 +542,8 @@ static void configure_throughput_check(struct flb_config *config)
flb_utils_split(config->hc_throughput_output_plugins, ',', 0);

if (!throughput_check_state.output_plugins) {
flb_free(throughput_check_state.sample_list);
flb_free(throughput_check_state.input_plugins);
flb_errno();
return;
}
Expand Down

0 comments on commit 5860b2e

Please sign in to comment.