Skip to content

Commit 05c8c3a

Browse files
cosmo0920edsiper
authored andcommitted
out_s3: Add a NULL check for plugging SEGV on dry_run
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 02c9e9f commit 05c8c3a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/out_s3/s3.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,11 @@ static int cb_s3_worker_exit(void *data, struct flb_config *config)
11121112
struct worker_info *info;
11131113
struct flb_s3 *ctx = data;
11141114

1115-
flb_plg_info(ctx->ins, "initializing worker");
1115+
if (!ctx) {
1116+
return 0;
1117+
}
1118+
1119+
flb_plg_info(ctx->ins, "terminating worker");
11161120

11171121
info = FLB_TLS_GET(s3_worker_info);
11181122
if (info != NULL) {

0 commit comments

Comments
 (0)