From cbfc240231ef40c835c129aa85f50172ccf22bbe Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 14 Oct 2024 13:54:30 -0600 Subject: [PATCH] out_s3: release context on mock client excepion (CID 310831) Signed-off-by: Eduardo Silva --- plugins/out_s3/s3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index b8fe80f0dd2..3b1edafbdab 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -247,6 +247,7 @@ struct flb_http_client *mock_s3_call(char *error_env_var, char *api) c->resp.data = flb_calloc(len + 1, sizeof(char)); if (!c->resp.data) { flb_errno(); + flb_free(c); return NULL; } memcpy(c->resp.data, resp, len);