Skip to content

Commit

Permalink
out_s3: fix use-after-free in destructor
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Rittner <[email protected]>
  • Loading branch information
rittneje committed Jul 9, 2021
1 parent 99d29a8 commit 7e389a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/out_s3/s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,14 @@ static void s3_context_destroy(struct flb_s3 *ctx)
flb_tls_destroy(ctx->sts_provider_tls);
}

if (ctx->client_tls) {
flb_tls_destroy(ctx->client_tls);
}

if (ctx->s3_client) {
flb_aws_client_destroy(ctx->s3_client);
}

if (ctx->client_tls) {
flb_tls_destroy(ctx->client_tls);
}

if (ctx->free_endpoint == FLB_TRUE) {
flb_free(ctx->endpoint);
}
Expand Down

0 comments on commit 7e389a5

Please sign in to comment.