diff --git a/src/flb_plugin_proxy.c b/src/flb_plugin_proxy.c index 5acba5e7078..48bf17525b4 100644 --- a/src/flb_plugin_proxy.c +++ b/src/flb_plugin_proxy.c @@ -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) { diff --git a/src/proxy/go/go.c b/src/proxy/go/go.c index 9d95a88afcc..e77af80a0d8 100644 --- a/src/proxy/go/go.c +++ b/src/proxy/go/go.c @@ -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; }