From 5df6bb0691b5221bcc777959ae81c6f8798b9f53 Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Tue, 22 Apr 2025 04:24:44 +0300 Subject: [PATCH] pipeline: inputs: podman_metrics: fixed use after free which was discovered by failed CI builds (after migration from GCC 7 to GCC 9 in https://github.com/fluent/fluent-bit/pull/10230). Signed-off-by: Marat Abrarov --- plugins/in_podman_metrics/podman_metrics.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/in_podman_metrics/podman_metrics.c b/plugins/in_podman_metrics/podman_metrics.c index 511ec3cee38..40fd064aac8 100644 --- a/plugins/in_podman_metrics/podman_metrics.c +++ b/plugins/in_podman_metrics/podman_metrics.c @@ -231,12 +231,11 @@ static int create_counter(struct flb_in_metrics *ctx, struct cmt_counter **count } + labels = (char *[]){id, name, image_name, interface}; if (interface == NULL) { - labels = (char *[]){id, name, image_name}; label_count = 3; } else { - labels = (char *[]){id, name, image_name, interface}; label_count = 4; }