From 6a73047cf2ced0a311ee0c3ef59e3162cbc2cee2 Mon Sep 17 00:00:00 2001 From: Shelby Hagman Date: Wed, 22 Apr 2026 20:15:49 +0000 Subject: [PATCH] filter_kubernetes: destroy upstream and TLS context on happy path exit Signed-off-by: Shelby Hagman --- plugins/filter_kubernetes/kubernetes_aws.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/filter_kubernetes/kubernetes_aws.c b/plugins/filter_kubernetes/kubernetes_aws.c index 87b701f76e0..6aed7306854 100644 --- a/plugins/filter_kubernetes/kubernetes_aws.c +++ b/plugins/filter_kubernetes/kubernetes_aws.c @@ -283,6 +283,10 @@ int fetch_pod_service_map(struct flb_kube *ctx, char *api_server_url, flb_http_client_destroy(c); flb_upstream_conn_recycle(u_conn, FLB_FALSE); flb_upstream_conn_release(u_conn); + flb_upstream_destroy(ctx->aws_pod_association_upstream); + flb_tls_destroy(ctx->aws_pod_association_tls); + ctx->aws_pod_association_upstream = NULL; + ctx->aws_pod_association_tls = NULL; } return 0; }