@@ -721,6 +721,7 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
721721 out_flush = (struct flb_output_flush * ) flb_calloc (1 , sizeof (struct flb_output_flush ));
722722 if (!out_flush ) {
723723 flb_errno ();
724+
724725 return NULL ;
725726 }
726727
@@ -774,6 +775,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
774775 p_buf = flb_calloc (evc -> size * 2 , sizeof (char ));
775776
776777 if (p_buf == NULL ) {
778+ flb_errno ();
779+
777780 flb_coro_destroy (coro );
778781 flb_free (out_flush );
779782
@@ -833,6 +836,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
833836 flb_realloc (p_buf , p_size + serialized_context_size );
834837
835838 if (resized_serialization_buffer == NULL ) {
839+ flb_errno ();
840+
836841 cmt_encode_msgpack_destroy (serialized_context_buffer );
837842 flb_coro_destroy (coro );
838843 flb_free (out_flush );
@@ -883,6 +888,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
883888 p_buf = flb_calloc (evc -> size * 2 , sizeof (char ));
884889
885890 if (p_buf == NULL ) {
891+ flb_errno ();
892+
886893 flb_coro_destroy (coro );
887894 flb_free (out_flush );
888895
@@ -930,6 +937,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
930937 flb_realloc (p_buf , p_size + serialized_context_size );
931938
932939 if (resized_serialization_buffer == NULL ) {
940+ flb_errno ();
941+
933942 ctr_encode_msgpack_destroy (serialized_context_buffer );
934943 flb_coro_destroy (coro );
935944 flb_free (out_flush );
@@ -980,6 +989,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
980989 p_buf = flb_calloc (evc -> size * 2 , sizeof (char ));
981990
982991 if (p_buf == NULL ) {
992+ flb_errno ();
993+
983994 flb_coro_destroy (coro );
984995 flb_free (out_flush );
985996
@@ -1026,6 +1037,8 @@ struct flb_output_flush *flb_output_flush_create(struct flb_task *task,
10261037 flb_realloc (p_buf , p_size + cfl_sds_len (serialized_profiles_context_buffer ));
10271038
10281039 if (resized_serialization_buffer == NULL ) {
1040+ flb_errno ();
1041+
10291042 cprof_encode_msgpack_destroy (serialized_profiles_context_buffer );
10301043 flb_coro_destroy (coro );
10311044 flb_free (out_flush );
0 commit comments