Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugins/in_cpu/in_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ void *in_cpu_flush(void *in_context, int *size)
msgpack_sbuffer *sbuf;
struct flb_in_cpu_config *ctx = in_context;

if (ctx->data_idx == 0)
return NULL;

sbuf = &ctx->mp_sbuf;
*size = sbuf->size;
buf = malloc(sbuf->size);
Expand Down
3 changes: 3 additions & 0 deletions plugins/in_kmsg/in_kmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ void *in_kmsg_flush(void *in_context, int *size)
msgpack_sbuffer *sbuf;
struct flb_in_kmsg_config *ctx = in_context;

if (ctx->buffer_id == 0)
return NULL;

sbuf = &ctx->mp_sbuf;
*size = sbuf->size;
buf = malloc(sbuf->size);
Expand Down
3 changes: 3 additions & 0 deletions plugins/in_mem/in_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ void *in_mem_flush(void *in_context, int *size)
char *buf;
struct flb_in_mem_config *ctx = in_context;

if (ctx->idx == 0)
return NULL;

buf = malloc(ctx->sbuf.size);
if (!buf) {
return NULL;
Expand Down