Skip to content

Commit 2598c57

Browse files
committed
pipeline: outputs: es: fixed error handling when parsing cloud credentials
Signed-off-by: Marat Abrarov <[email protected]>
1 parent c4e5e8b commit 2598c57

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/out_es/es_conf_parse.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ int flb_es_conf_set_cloud_credentials(const char *cloud_auth,
4949
return 0;
5050
}
5151

52-
toks = flb_utils_split((const char *)cloud_auth, ':', -1);
52+
toks = flb_utils_split(cloud_auth, ':', -1);
53+
if (!toks) {
54+
return -1;
55+
}
5356
mk_list_foreach(head, toks) {
5457
entry = mk_list_entry(head, struct flb_split_entry, _head);
5558
if (!items) {

0 commit comments

Comments
 (0)