Skip to content

Commit cbfc240

Browse files
committed
out_s3: release context on mock client excepion (CID 310831)
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 562fc80 commit cbfc240

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/out_s3/s3.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ struct flb_http_client *mock_s3_call(char *error_env_var, char *api)
247247
c->resp.data = flb_calloc(len + 1, sizeof(char));
248248
if (!c->resp.data) {
249249
flb_errno();
250+
flb_free(c);
250251
return NULL;
251252
}
252253
memcpy(c->resp.data, resp, len);

0 commit comments

Comments
 (0)