Skip to content

Commit 5860b2e

Browse files
committed
fixup! http_server/health: Implement throughput health check
Address Leonardo review: add missing `free` calls in case of allocation failure Signed-off-by: Thiago Padilha <[email protected]>
1 parent 4731593 commit 5860b2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/http_server/api/v1/health.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ static void configure_throughput_check(struct flb_config *config)
533533
flb_utils_split(config->hc_throughput_input_plugins, ',', 0);
534534

535535
if (!throughput_check_state.input_plugins) {
536+
flb_free(throughput_check_state.sample_list);
536537
flb_errno();
537538
return;
538539
}
@@ -541,6 +542,8 @@ static void configure_throughput_check(struct flb_config *config)
541542
flb_utils_split(config->hc_throughput_output_plugins, ',', 0);
542543

543544
if (!throughput_check_state.output_plugins) {
545+
flb_free(throughput_check_state.sample_list);
546+
flb_free(throughput_check_state.input_plugins);
544547
flb_errno();
545548
return;
546549
}

0 commit comments

Comments
 (0)