From 9f3cc81362e7daaec8afe4f62b2a876944678e11 Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Fri, 3 Nov 2023 09:40:41 +0900 Subject: [PATCH] in_calyptia_fleet: add missing release function Signed-off-by: Takahiro Yamashita --- plugins/in_calyptia_fleet/in_calyptia_fleet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.c b/plugins/in_calyptia_fleet/in_calyptia_fleet.c index ea8bd511873..ee5fd2d980f 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -1147,6 +1147,7 @@ static int in_calyptia_fleet_init(struct flb_input_instance *in, if (tmpdir == NULL) { flb_plg_error(in, "unable to find temporary directory (%%TEMP%%)."); + flb_free(ctx); return -1; } @@ -1154,6 +1155,7 @@ static int in_calyptia_fleet_init(struct flb_input_instance *in, if (ctx->config_dir == NULL) { flb_plg_error(in, "unable to allocate config-dir."); + flb_free(ctx); return -1; } flb_sds_printf(&ctx->config_dir, "%s" PATH_SEPARATOR "%s", tmpdir, "calyptia-fleet"); @@ -1202,6 +1204,7 @@ static int in_calyptia_fleet_init(struct flb_input_instance *in, if (ret == -1) { flb_plg_error(ctx->ins, "could not initialize collector for fleet input plugin"); + flb_upstream_destroy(ctx->u); flb_free(ctx); return -1; }