From 7ce4aa6a07fe5e37208d8bf89569d5cbe59df70a Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Sun, 24 Sep 2023 08:30:06 +0900 Subject: [PATCH] out_oracle_log_analytics: add flb_sds_destroy for key Signed-off-by: Takahiro Yamashita --- plugins/out_oracle_log_analytics/oci_logan_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/out_oracle_log_analytics/oci_logan_conf.c b/plugins/out_oracle_log_analytics/oci_logan_conf.c index 3778a298d2b..25a53454463 100644 --- a/plugins/out_oracle_log_analytics/oci_logan_conf.c +++ b/plugins/out_oracle_log_analytics/oci_logan_conf.c @@ -209,6 +209,7 @@ static int global_metadata_fields_create(struct flb_oci_logan *ctx) } f->val = flb_sds_create(val->str); if (!f->val) { + flb_sds_destroy(f->key); flb_free(f); return -1; } @@ -249,6 +250,7 @@ static int log_event_metadata_create(struct flb_oci_logan *ctx) } f->val = flb_sds_create(val->str); if (!f->val) { + flb_sds_destroy(f->key); flb_free(f); return -1; }