From 61a37f0fc03748d83ab707556b5fd2ac25ee4d64 Mon Sep 17 00:00:00 2001 From: Neil Twigg Date: Mon, 29 Jul 2024 11:19:18 +0100 Subject: [PATCH] Fix panic in `getAccAndResultFromCache` Signed-off-by: Neil Twigg --- server/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/client.go b/server/client.go index 99134bd0c5b..e68d70fa947 100644 --- a/server/client.go +++ b/server/client.go @@ -5436,7 +5436,9 @@ func (c *client) getAccAndResultFromCache() (*Account, *SublistResult) { if !ok { if c.kind == ROUTER && len(c.route.accName) > 0 { - acc = c.acc + if acc = c.acc; acc == nil { + return nil, nil + } } else { // Match correct account and sublist. if acc, _ = c.srv.LookupAccount(string(c.pa.account)); acc == nil {