Skip to content

Commit 7400c4b

Browse files
Deepak Rajaedsiper
authored andcommitted
out_stackdriver: Initialize the metadata_server value to NULL
Signed-off-by: Deepak Raja <[email protected]>
1 parent 487a054 commit 7400c4b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

plugins/out_stackdriver/stackdriver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@ static struct flb_config_map config_map[] = {
24262426
"Set the path for the google service credentials file"
24272427
},
24282428
{
2429-
FLB_CONFIG_MAP_STR, "metadata_server", FLB_STD_METADATA_SERVER,
2429+
FLB_CONFIG_MAP_STR, "metadata_server", (char *)NULL,
24302430
0, FLB_TRUE, offsetof(struct flb_stackdriver, metadata_server),
24312431
"Set the metadata server"
24322432
},

plugins/out_stackdriver/stackdriver_conf.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ struct flb_stackdriver *flb_stackdriver_conf_create(struct flb_output_instance *
275275
ctx->env->metadata_server = flb_sds_create(tmp);
276276
ctx->metadata_server = ctx->env->metadata_server;
277277
}
278+
else {
279+
ctx->metadata_server = flb_sds_create(FLB_STD_METADATA_SERVER);
280+
}
278281
}
279282
flb_plg_info(ctx->ins, "metadata_server set to %s", ctx->metadata_server);
280283

0 commit comments

Comments
 (0)