Skip to content

Commit

Permalink
output: added missing error reporting macro calls
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Dec 19, 2024
1 parent e67d47d commit 42f5d58
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/fluent-bit/flb_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
out_flush = (struct flb_output_flush *) flb_calloc(1, sizeof(struct flb_output_flush));
if (!out_flush) {
flb_errno();

return NULL;
}

Expand Down Expand Up @@ -774,6 +775,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
p_buf = flb_calloc(evc->size * 2, sizeof(char));

if (p_buf == NULL) {
flb_errno();

flb_coro_destroy(coro);
flb_free(out_flush);

Expand Down Expand Up @@ -833,6 +836,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
flb_realloc(p_buf, p_size + serialized_context_size);

if (resized_serialization_buffer == NULL) {
flb_errno();

cmt_encode_msgpack_destroy(serialized_context_buffer);
flb_coro_destroy(coro);
flb_free(out_flush);
Expand Down Expand Up @@ -883,6 +888,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
p_buf = flb_calloc(evc->size * 2, sizeof(char));

if (p_buf == NULL) {
flb_errno();

flb_coro_destroy(coro);
flb_free(out_flush);

Expand Down Expand Up @@ -930,6 +937,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
flb_realloc(p_buf, p_size + serialized_context_size);

if (resized_serialization_buffer == NULL) {
flb_errno();

ctr_encode_msgpack_destroy(serialized_context_buffer);
flb_coro_destroy(coro);
flb_free(out_flush);
Expand Down Expand Up @@ -980,6 +989,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
p_buf = flb_calloc(evc->size * 2, sizeof(char));

if (p_buf == NULL) {
flb_errno();

flb_coro_destroy(coro);
flb_free(out_flush);

Expand Down Expand Up @@ -1026,6 +1037,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
flb_realloc(p_buf, p_size + cfl_sds_len(serialized_profiles_context_buffer));

if (resized_serialization_buffer == NULL) {
flb_errno();

cprof_encode_msgpack_destroy(serialized_profiles_context_buffer);
flb_coro_destroy(coro);
flb_free(out_flush);
Expand Down

0 comments on commit 42f5d58

Please sign in to comment.