diff --git a/changelog/v1.18.3/memleak.yaml b/changelog/v1.18.3/memleak.yaml new file mode 100644 index 00000000000..567d9d149f1 --- /dev/null +++ b/changelog/v1.18.3/memleak.yaml @@ -0,0 +1,5 @@ +changelog: + - type: FIX + issueLink: https://github.com/solo-io/solo-projects/issues/7573 + description: >- + Fix a memory leaking a log name. diff --git a/projects/gloo/pkg/syncer/setup/setup_syncer.go b/projects/gloo/pkg/syncer/setup/setup_syncer.go index e3281df2906..71c352142a0 100644 --- a/projects/gloo/pkg/syncer/setup/setup_syncer.go +++ b/projects/gloo/pkg/syncer/setup/setup_syncer.go @@ -1375,15 +1375,15 @@ func runQueue(ctx context.Context, proxyReconcileQueue ggv2utils.AsyncQueue[gloo // the proxy type key/value must stay in sync with the one defined in projects/gateway2/translator/gateway_translator.go utils.ProxyTypeKey: utils.GatewayApiProxyValue, } + ctx = contextutils.WithLogger(ctx, "proxyCache") + logger := contextutils.LoggerFrom(ctx) + proxyReconciler := gloov1.NewProxyReconciler(proxyClient, statusutils.NewNoOpStatusClient()) for { proxyList, err := proxyReconcileQueue.Dequeue(ctx) if err != nil { return } - ctx = contextutils.WithLogger(ctx, "proxyCache") - logger := contextutils.LoggerFrom(ctx) - // Proxy CR is located in the writeNamespace, which may be different from the originating Gateway CR err = proxyReconciler.Reconcile( writeNamespace,