Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: plugin_proxy: Handle FLBPluginInit(cb_init) error correctly and plug a SEGV case #8273

Merged
merged 1 commit into from
Dec 19, 2023
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
6 changes: 6 additions & 0 deletions src/flb_plugin_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,12 @@ int flb_proxy_output_cb_init(struct flb_output_instance *o_ins,
pc->proxy->def->proxy);
}

if (ret == -1) {
flb_error("[output] could not initialize '%s' plugin",
o_ins->p->name);
return -1;
}

/* Multi-threading enabled if configured */
ret = flb_output_enable_multi_threading(o_ins, config);
if (ret == -1) {
Expand Down
1 change: 0 additions & 1 deletion src/proxy/go/go.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ int proxy_go_output_init(struct flb_plugin_proxy *proxy)
if (ret <= 0) {
flb_error("[go proxy]: plugin '%s' failed to initialize",
plugin->name);
flb_free(plugin);
return -1;
}

Expand Down
Loading