Skip to content

Commit

Permalink
out_opensearch: fix a use-after-free issue (CID 508013) (#9233)
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored Aug 15, 2024
1 parent a827c93 commit 5b5d49e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/out_opensearch/opensearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,11 +1028,11 @@ static void cb_opensearch_flush(struct flb_event_chunk *event_chunk,

/* Cleanup */
flb_http_client_destroy(c);
flb_sds_destroy(pack);

if (final_payload_buf != pack) {
flb_free(final_payload_buf);
}
flb_sds_destroy(pack);

flb_upstream_conn_release(u_conn);
if (signature) {
Expand Down

0 comments on commit 5b5d49e

Please sign in to comment.